New topic: Toolbar DropDown menu - how?
<http://forums.realsoftware.com/viewtopic.php?t=45151> Page 1 of 1 [ 1 post ] Previous topic | Next topic Author Message Markus Winter Post subject: Toolbar DropDown menu - how?Posted: Tue Aug 28, 2012 10:26 am Joined: Sun Feb 19, 2006 4:00 pm Posts: 1166 Location: Heidelberg, Germany Hi all, I know how to do the whole toolbar button thing in code like this Dim DropdownButton as new ToolButton DropDownButton.Style=ToolButton.ToolStyleDropDown DropDownButton.Caption="Select" DropDownButton.Icon = select_32x32 //create a menu Dim myMenu as New MenuItem Dim myMenuItem1 as New MenuItem Dim myMenuItem2 as New MenuItem Dim myMenuitem3 as New MenuItem DropDownButton.Name="Cities Menu" MyMenu.Text="Cities" MyMenuItem1.Text="Edmonton" MyMenuItem2.Text="Calgary" MyMenuitem3.Text="Red Deer" Mymenu.Append myMenuItem1 MyMenu.Append myMenuItem2 MyMenu.Append myMenuItem3 //assign the new menu to the toolitem.. DropDownButton.DropdownMenu=myMenu //add to the toolbar Me.Append DropDownButton however I tried the toolbar editor and it baffles me. I add a toolbutton in the editor, set it's style to dropdown button - but then how do I add the menu? I tried the following in the action and open event of the toolbar //create a menu Dim myMenu as New MenuItem Dim myMenuItem1 as New MenuItem Dim myMenuItem2 as New MenuItem Dim myMenuitem3 as New MenuItem MyMenu.Text="Cities" MyMenuItem1.Text="Edmonton" MyMenuItem2.Text="Calgary" MyMenuitem3.Text="Red Deer" Mymenu.Append myMenuItem1 MyMenu.Append myMenuItem2 MyMenu.Append myMenuItem3 //assign the new menu to the toolitem.. DropDownButton.DropdownMenu=myMenu The IDE steadfastly insists that the toolbutton DropDownButton doesn't exist. What am I missing here? Thanks Markus Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 1 post ] -- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
