I have an TdxBarSubItem on my RibbonBar and will fill the submenu list at runtime. I ́m scanning files in a specific path and will then create a TdxBarButton for each fileIi found, and a BarSeperator for the different FileGroups. So it should look like that:
FileGroup (BarSeperator)
File
File
File
FileGroup
…
I will also destroy these components at runtime.
Can you please help?
Best regards
Michael Reisch
Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Hi Michael,
Attached is a small sample project demonstrating how to accomplish this task. Please review it and let us know your results.
Thanks,
Vito
Hello Vito,
thanks it works fine. I do it the same way, but there was nothing shown. Because in my first step I create only 4 BarSeparators but no Buttons. So I wonder why these are not shown. Then I find out that the seperators will be shown if there was following buttons.
But a second question:
The contents I show in this BarSubItem is dynamically and can change while application is running. So I need a rescan to show the new Buttons. For that I will delete first all old one, but in fact only the Buttons and Separators of this BarSubItem. Is there a easy way to do that? To delete this content I think it will not be enough to Clear the ItemLinks, I have also to destroy the objects - please give me an idea how to do that in an easy way.
Best regards
Michael
Hi Michael,
Please use the following code to clear the required ItemLinks collection and delete the corresponding bar items:
procedure TForm1.ClearItemLinks(AItemLinks: TdxBarItemLinks);
var
I: Integer;
begin
AItemLinks.BarManager.LockUpdate := True;
try
for I := AItemLinks.Count -1 downto 0 do
AItemLinks[I].Item.Free;
AItemLinks.Clear;
finally
AItemLinks.BarManager.LockUpdate := False;
end;
end;
Please let us know your results.
Thanks,
Vito
Hi Vito,
it works perfect. Thank you
Michael
Hi Michael,
You are welcome!
Thanks,
Vito