Posted: Tue Jun 11, 2002 7:24 am
Restored from previous forum. Originally posted by WolfgangS.
HI !
if you start the program, you can click the PB_ToolBarIcon_New and the window will be resized. I know how to resize the panel, but is it possible to "update" the line from the menu ?
cu
WolfgangS
OpenWindow(0, 100, 100, 640, 400, #PB_Window_SystemMenu|#PB_Window_SizeGadget , "ToolBar example")
If CreateToolBar(0,WindowID(0))
ToolBarStandardButton(1, #PB_ToolBarIcon_New)
ToolBarStandardButton(2, #PB_ToolBarIcon_Open)
EndIf
If CreateGadgetList(WindowID())
PanelGadget(10,0,28,640,400-28)
EndIf
If CreateMenu(20,WindowID(0))
MenuTitle("&File")
MenuItem(1,"&New")
MenuItem(2,"&Open")
MenuItem(3,"&Save")
EndIf
Repeat
WEvent=WaitWindowEvent()
If WEvent=#PB_EventMenu
Select EventGadgetID()
Case 1
AddGadgetItem(10, -1, "")
ResizeWindow(700, 400)
Case 2
RemoveGadgetItem(10,GetGadgetState(10))
EndSelect
EndIf
Until WEvent=#PB_EventCloseWindow
Edited by - WolfgangS on 11 June 2002 08:44:26
HI !
if you start the program, you can click the PB_ToolBarIcon_New and the window will be resized. I know how to resize the panel, but is it possible to "update" the line from the menu ?
cu
WolfgangS
OpenWindow(0, 100, 100, 640, 400, #PB_Window_SystemMenu|#PB_Window_SizeGadget , "ToolBar example")
If CreateToolBar(0,WindowID(0))
ToolBarStandardButton(1, #PB_ToolBarIcon_New)
ToolBarStandardButton(2, #PB_ToolBarIcon_Open)
EndIf
If CreateGadgetList(WindowID())
PanelGadget(10,0,28,640,400-28)
EndIf
If CreateMenu(20,WindowID(0))
MenuTitle("&File")
MenuItem(1,"&New")
MenuItem(2,"&Open")
MenuItem(3,"&Save")
EndIf
Repeat
WEvent=WaitWindowEvent()
If WEvent=#PB_EventMenu
Select EventGadgetID()
Case 1
AddGadgetItem(10, -1, "")
ResizeWindow(700, 400)
Case 2
RemoveGadgetItem(10,GetGadgetState(10))
EndSelect
EndIf
Until WEvent=#PB_EventCloseWindow
Edited by - WolfgangS on 11 June 2002 08:44:26