Category Selection

Hi there, I was wondering whether anyone could point me in the right direction in achieving the following.
I would like users to be able to select a category from a dropdown. The dropdown needs to be sectioned to make finding the right category easy, for example:

Parent Category

  • Cat 1
  • Cat 2
  • etc
    Parent Category 2
  • Cat etc

They should not be able to choose Parent Category. So basically looking for the html equivalent of optgroup for select.

Thanks
Adam

I have done a lot of searching and cant find anything. So are there any other patterns that people use to achieve the same that doesn’t make it onerous on the end user?

Submenu? The parent categories would be the menu, the cat1 etc the submenues.

Have a look at contextualmenu in the docs

http://documentation.xojo.com/index.php/RectControl.ConstructContextualMenu

ConstructContextualMenu certainly is what I am looking for… But not as a contextual menu. Anyway to make this appear on clicking of the control (not right click)

Maybe the following gives you some idea on how to achieve what you want

http://drdakin.tripod.com/REALbasic/ListboxSubMenu/listbox-submenu.zip

[quote=178667:@Markus Winter]Maybe the following gives you some idea on how to achieve what you want

http://drdakin.tripod.com/REALbasic/ListboxSubMenu/listbox-submenu.zip[/quote]
Thanks. I think this will help me achieve what I am looking for :slight_smile: