Is there a gadget or a way to use Textgadget, that will result in it remembering the last few entries and allowing them to be accessed via a dropdown selection area?
Like when you click on a text entry area in a web browser, this commonly happens, letting you quickly choose something that you have entered previously.
Textgadget with history of entries?
Re: Textgadget with history of entries?
Combobox ?
Code: Select all
If OpenWindow(0, 0, 0, 270, 180, "ComboBoxGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
ComboBoxGadget(0, 10, 10, 250, 21, #PB_ComboBox_Editable)
AddGadgetItem(0, -1, "ComboBox 0")
AddGadgetItem(0, -1, "ComboBox 1")
AddGadgetItem(0, -1, "ComboBox 2")
SetGadgetState(0, 2)
Repeat : Until WaitWindowEvent()= #PB_Event_CloseWindow
EndIf
Re: Textgadget with history of entries?
Idle got there first, but with edits too...
Code: Select all
#KbdReturn = 1
Define.S Entry
If OpenWindow(0, 0, 0, 270, 180, "ComboBoxGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
ComboBoxGadget(0, 10, 10, 250, 21, #PB_ComboBox_Editable)
AddGadgetItem(0, -1, "Historical item 1")
AddGadgetItem(0, -1, "Historical item 2")
AddGadgetItem(0, -1, "Historical item 3")
SetGadgetState(0, 0)
AddKeyboardShortcut(0, #PB_Shortcut_Return, #KbdReturn)
Repeat :
Event = WaitWindowEvent()
If Event = #PB_Event_Menu And EventMenu() = #KbdReturn
Entry = GetGadgetText(0)
AddGadgetItem(0, 0, Entry)
SetGadgetState(0, 0)
EndIf
Until Event = #PB_Event_CloseWindow
EndIf
Re: Textgadget with history of entries?
viewtopic.php?t=79076
But I don't understand how to do it in the main menu. It is necessary to generate a list and attach the generated menu to a certain item of the main menu.
But I don't understand how to do it in the main menu. It is necessary to generate a list and attach the generated menu to a certain item of the main menu.
Re: Textgadget with history of entries?
Great, thanks guys, sorted now.