Flicker on ComboBox

Archives Forums/MaxGUI Bug Reports/Flicker on ComboBox

Midimaster(Posted 2014) [#1]
If I combine a ComboBox and a Canvas on a MAC OsX 10.9 the ComboBox cannot be used anymore.

In my window I created a new panel 240x240pix. Inside there is a 200x200 canvas.

below the panel there are the combo boxes at 100,400 far away from the problematic area.

When I now add a timer and use the EVENT_TIMERTICK to fresh up the game screen, the combo boxes do not longer work as expected. With a timer rate below 60 the problem seems not to there, but it only look like: the problem appear seldom. With a timer rate of 120 the problem appears always:
' createcombobox.bmx

Strict

Import MaxGui.Drivers

AppTitle = "ComboBox Style Example"

Global window:TGadget = CreateWindow( AppTitle, 100, 100, 600, 600, Null, WINDOW_TITLEBAR|WINDOW_STATUS )
	
Local panel:TGadget = CreatePanel(0,0,240,240,window,PANEL_ACTIVE)
SetGadgetLayout panel, EDGE_ALIGNED, EDGE_ALIGNED, EDGE_ALIGNED, EDGE_ALIGNED
SetGadgetColor panel ,0,255,0
		Global Canvas:TGadget =CreateCanvas(5 , 5 , 200, 200 , panel)
		SetGadgetLayout Canvas , 1,0,1,0
	CreateLabel( "No Style (0): ", 5, 5, ClientWidth(window)-10, 24, window, LABEL_LEFT )
	Global stdComboBox:TGadget = CreateComboBox( 5, 429, ClientWidth(window)-10, 26, window, 0 )
		AddGadgetItem stdComboBox, "Short"
		AddGadgetItem stdComboBox, "Medium"
		AddGadgetItem stdComboBox, "Fat", True
		AddGadgetItem stdComboBox, "Humungous"
		
	CreateLabel( "COMBOBOX_EDITABLE: ", 5, 59, ClientWidth(window)-10, 24, window, LABEL_LEFT )
	Global editcombobox:TGadget = CreateComboBox( 5, 483, ClientWidth(window)-10, 26, window, COMBOBOX_EDITABLE )
		AddGadgetItem editcombobox, "United Kingdom"
		AddGadgetItem editcombobox, "United States", True

Local tmpText$
CreateTimer 120
Repeat
	WaitEvent()
	Print CurrentEvent.ToString()
	Select EventID()
		'Combobox Event(s)
		'EventData() holds the index of the selected item (or -1 if no item is currently selected)
		Case EVENT_GADGETPAINT
			SetGraphics CanvasGraphics(canvas)
			SetClsColor 255,0,0
			Cls
			Flip
  		Case EVENT_TIMERTICK
  			RedrawGadget canvas	
		Case EVENT_GADGETACTION
			Select EventSource()
				Case stdComboBox
					tmpText = ""
					If EventData() > -1 Then
						tmpText = GadgetItemText(TGadget(EventSource()), EventData())
					EndIf
					SetStatusText window, "Weight chosen: " + tmpText
				Case editComboBox
					tmpText = ""
					If EventData() > -1 Then 
						tmpText = GadgetItemText(TGadget(EventSource()), EventData())
					Else 
						tmpText = GadgetText(TGadget(EventSource())) + " [user text]"
					EndIf
					SetStatusText window, "Country chosen: " + tmpText
			EndSelect
		Case EVENT_WINDOWCLOSE, EVENT_APPTERMINATE
			End
	EndSelect
Forever


Is there still anybody responsible for the MaxGui Bugs?