This is a newbish question, but how could I draw on top of a list box. To be more specific, I've got a menu I want to appear, regardless whether I'm clicking on a Listbox, or if I'm clicking on a button, or in open space, how could I do this?
Overwriting on Listboxes
BlitzMax Forums/BlitzMax GUI Programming/Overwriting on Listboxes Create a new window and draw labels / buttons in there.
alternatively use a panel and do the same.
but you will have to fight the problem that not all gadgets return mousedown events
alternatively use a panel and do the same.
but you will have to fight the problem that not all gadgets return mousedown events
I think I see.... Edit: Didn't work. Here's the code.
and here's where I test for it.
Local LoopFunctionsPanel:TGadget = CreatePanel(0, 0, ClientWidth(WindowTabber), ClientHeight(WindowTabber), WindowTabber, PANEL_ACTIVE) Local LoopFunctionsLabel:TGadget = CreateLabel("Loop Functions", 0, 0, ClientWidth(WindowTabber), 20, LoopFunctionsPanel, LABEL_CENTER) Local LoopFunctionsList:TGadget = CreateListBox(10, 30, ClientWidth(WindowTabber) - 20, ClientHeight(WindowTabber) - 70, LoopFunctionsPanel) Local LoopFunctionsOkButton:TGadget = CreateButton("Ok", 10, ClientHeight(WindowTabber) - 30, ClientWidth(WindowTabber) - 20, 20, LoopFunctionsPanel) Local ManualLoopFunctionListPanel:TGadget = CreatePanel(0, 0, ClientWidth(WindowTabber), ClientHeight(WindowTabber), WindowTabber, PANEL_ACTIVE) Local ManualCreateMenu:TGadget = CreateMenu("Create", 2, WindowTabber) CreateMenu("New", 1200, ManualCreateMenu)
and here's where I test for it.
If EventSource() = ManualLoopFunctionListPanel Or EventSource() = LoopFunctionsPanel If EventData() = 2 Then PopupWindowMenu MainWindow, ManualCreateMenu EndIf EndIf
Not fixed...
if you want to have a popup menu, you don't need pannels, only a menu with menu entries
I don't understand.
well unimportant: it does not matter. gadgets that don't fire mousedown events don't fire them, even if you put 20 panels below them ... thats because they automatically handle them like the listbox for example (the treeview fires a different event for right click)