[Gambas-user] Adding menu item in code > no caption visible (Solved)
richard terry
rterry at ...1822...
Fri Mar 21 04:33:01 CET 2008
Stupid me, wrong flag, this works fine now, should have RTFM (which I did but
mixed up the TRUE/FALSE flags.
----------------------------------------------------------------------------------------
DIM hmenu AS Menu
DIM item AS cPastHistory
FOR EACH item IN currentpatient.past_history
hmenu = NEW Menu(menu_EditorTab_AddNotes, FALSE)
hmenu.Caption = item.description
NEXT
-----------------------------------------------------------------------------------------
Regards
Richard
On Fri, 21 Mar 2008 11:30:03 am richard terry wrote:
> I've overiddden the menu on the tabstip and want to dynamically add menu
> items as sub items in the menu to an existing menu called
> menu_EditorTab_AddNotes:
>
> This sub stops the original tab strip menu from popping up, it does work
> as the print statement shows up on the console,I enclose a png of what it
> looks like on the screen.
>
> However, no text shows up in the caption.
>
> PUBLIC SUB Editor_tabstrip_Menu()
> DIM hmenu AS Menu
> STOP EVENT
> PRINT "this worked"
> Editor_TapStip_CreateMenuChild("Hi There")
> menu_EditorTab.popup
>
> END
> PUBLIC SUB Editor_TapStip_CreateMenuChild(newmenuname AS String)
> DIM hmenu AS Menu
> hmenu = NEW Menu(menu_EditorTab_AddNotes, TRUE)
> hmenu.Caption = newmenuname
> END
>
> An help appreciated.
>
> Richard
More information about the User
mailing list