General information
Category:
Coding, syntax & commands
>Hello community,
>
>On my form i have my main page "myform.pageframe1" with several adicional pages.
>Also, they are 2 buttons, one for clients and another one for Suppliers.
>
>Suppose for client i have myform.pageframe1.activepage nº 1 , 2 , 3 and 4, and for suppliers i have myform.pageframe1.activepage nº 4,6,7.
>What i need is when i click on button Client the activepages 1,2,3 and 4 are visible, but if i click on button Supplier thoses activepages become invisibles and put visible the pages 4,6 and 7 and the reverse also.
>
>I need to know how can do that.
>
>Many thanks!
>Best regards,
>Luis
As Tamar mentioned, there isn't a Visible property for a Page within PageFrame -- so you're not able to hide the selection tab for the page. Depending on the situation, having a lot of "greyed out" tabs might become confusing or frustrating to the user. A workaround is to set the Tabs property to .F. (to remove the selection tabs from the PageFrame) and use another control (such as a ListBox) to act as a replacement for the selection tabs. That control would then set the ActivePage property of the PageFrame to select the Page within the PageFrame.
You could use a ListBox (positioned to the left or right of the PageFrame) to select the pages within a PageFrame. The contents of the ListBox can be programmatically set so that it only lists the relevant items. Code within the InteractiveChange event of the ListBox would then be used to assign the ActivePage of the PageFrame based on the item selected within the ListBox.
Using this method does afford you additional capabilities. If you use a treeview control for the page selection, you can have the list of pages arranged by category. If you use one of the OLE controls, you can present the page selections using icons.
The downside however is that you'll end up using up screen space for the additional control. Although you might think a dropdown list might fit the bill (as in its normal state it occupies very little space, but can be expanded to show multiple items), it's probably not a good choice as it's not immediately obvious to the user that you have multiple selections available.
Naoto Kimura
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only