Hi,
I want to show a recent file list in the application menu. If this list is empty a label with some info should be shown instead. On the bottom of the area should be a button to clear the recent file list. Pls see screenshots.
I have the following problems now:
1) I can not show the label "You haven't opened any files recently". It is always dispalyed with a header line below it. I can change that for the whole Apllication menu 2010 by setting LabelDisplay style. But I just want to modify this particular label.
2) i can not show the "Clear recent files list" button on the bottom of the page with a small width. It is always displayed below the Recent files - ListTool and with a width that covers the whole area width.
Any Ideas?
Thanks a lot
Michael
Hi Michael,
With a PopupControlContainerTool, no you cannot put a tool in there, but you can put in a panel, and in that put in a any combination of controls. So while ListTool won't work a ListBox, a UltraGrid, or just a series of UltraLabels, with them all wired to the same click event, where you can create a switch on the Text.
Hi Chris,
thanks for the answer.
I already know the possibility of using PopupControlContainerTool to show a UserControl but there I can't use ListTool to display the recent files because it doesn't inherit from Control. ListTool can only be used in ApplicationMenuArea or PopupMenuTool (regarding to the help documentation).
Any ideas?
Thanks
Hello Michael,
Unfortunately, both of your requests are not possible using the built in tools.
The style of the LabelTools in the content area is resolved using the ApplicationMenu2010's ContentArea.Settings.LabelDisplayStyle. There is no way to have different LabelDisplayStyles within the content area of the ApplicationMenu2010.
Additionally, you can't have a tool in the column of the content area that does not extend to fit the width of the column. As such, you can't force a ButtonTool to have a width smaller than a column.
However, the solution is that instead of using a PopupMenuTool to display a ListTool, LabelTool and Button tool for the last column, create a UserControl that contains the UI for that last column and display it using a PopupControlContainerTool. The PopupControlContainerTool will display the UserControl in the remain space of the ContentArea.
Let me know if you have any questions.
Chris