MacOS X - Textfield and SetGadgetSensitivity
Archives Forums/MaxGUI Bug Reports/MacOS X - Textfield and SetGadgetSensitivity
| ||
| I've found a problem under MacOS with Textfield and SetGadgetSensitivity. I've downloaded the last MaxGUI 1.42 beta, but the problem is still present. This is a basic example. Under Windows and Linux it works as expected. Under MacOS the EVENT_KEYUP is fired and intercepted, but you cant' change the textfield's content: you cant' delete or add anything in it. Not so useful...
' createtextfield.bmx
Import MaxGui.Drivers
Strict
Local window:TGadget
Local textfield:TGadget
Local button:TGadget
window=CreateWindow("My Window",30,20,320,200)
textfield=CreateTextField(4,4,120,22,window)
SetGadgetText( textfield,"A textfield gadget" )
' we need an OK button to catch return key
button=CreateButton("OK",130,4,80,24,window,BUTTON_OK)
ActivateGadget textfield
SetGadgetSensitivity textfield,SENSITIZE_KEYS
While WaitEvent()
Print CurrentEvent.ToString()
Select EventID()
Case EVENT_KEYUP
If EventSource()=textfield
Print "keyUp"
End If
Case EVENT_GADGETACTION
Select EventSource()
Case textfield
Print "textfield updated"
Case button
Print "return key / OK button pressed"
End Select
Case EVENT_WINDOWCLOSE
End
End Select
Wend
|