[Windows Programming] Add Name to List button not works
Posted: Wed Jul 11, 2018 7:57 pm
Hey Windows Programmers...,
I try to create an script, the user can typ an name via an input_requester...
So this is my script, written in PB5.6.2:
Just if you run this script, via the new file icon (or new name to list called) button, you can typ an name to the list.
But if you activate your name input via the 'InputRequester', the names had not be to the list...
So run this script and you should see thad it isn't works...So if you can find the problen, pleace
correct my code and post it here...
So can you correct my code pleace, thanks for help...
Jamie.
I try to create an script, the user can typ an name via an input_requester...
So this is my script, written in PB5.6.2:
Code: Select all
Procedure Window()
If OpenWindow(0, 0, 0, 128, 128, "List View", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
If CreateToolBar(0, WindowID(0))
ToolBarStandardButton(0, #PB_ToolBarIcon_New)
ListViewGadget(0, 0, 0, 128, 64)
EndIf
EndIf
EndProcedure
Procedure HandleEvents()
Repeat
Select WaitWindowEvent()
Case #PB_Event_Menu
Select EventMenu()
Case 0
Input$ = InputRequester("Add", "Name to List", "Name")
If Input$
AddGadgetItem(0, 1, Input$)
EndIf
EndSelect
Case #PB_Event_CloseWindow
Quit = 1
EndSelect
Until Quit = 1
EndProcedure
Window()
HandleEvents()
Just if you run this script, via the new file icon (or new name to list called) button, you can typ an name to the list.
But if you activate your name input via the 'InputRequester', the names had not be to the list...
So run this script and you should see thad it isn't works...So if you can find the problen, pleace
correct my code and post it here...
So can you correct my code pleace, thanks for help...
Jamie.