Overwriting on Listboxes

BlitzMax Forums/MaxGUI Module/Overwriting on Listboxes

TwoCorin517(Posted 2008) [#1]
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?


Dreamora(Posted 2008) [#2]
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


TwoCorin517(Posted 2008) [#3]
I think I see.... Edit: Didn't work. Here's the code.
	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



TwoCorin517(Posted 2008) [#4]
Not fixed...


Dreamora(Posted 2008) [#5]
if you want to have a popup menu, you don't need pannels, only a menu with menu entries


TwoCorin517(Posted 2008) [#6]
I don't understand.


Dreamora(Posted 2008) [#7]
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)