Text areas and text fields stuff
BlitzMax Forums/MaxGUI Module/Text areas and text fields stuff
| ||
Text fields look nicer because they have a thin border, instead of that ugly Windows 95-looking sunken border. Text areas can have their color set, and be read-only. Is there any chance a flag could be added like TEXTFIELD_READONLY? |
| ||
While waiting for the READONLY flag you could may use a disabled TextField. The only disadvantage is that that the foreground color defaults to gray, but beside that it may work for you. Also there is a Label with simple and sunken border which is only 1 pixel and does perhaps what you are looking for. I have attached a quick example: |
| ||
How about using SetGadgetFilter():Import MaxGui.Drivers Strict Global window:TGadget = CreateWindow("My Window",30,20,320,200) Global textfield:TGadget =CreateTextField(4,4,120,22,window) SetGadgetText( textfield,"A textfield gadget" ) ' Make read-only SetGadgetFilter( textfield, ReadOnlyCallback ) While WaitEvent() Print CurrentEvent.ToString() Select EventID() Case EVENT_GADGETACTION Select EventSource() Case textfield Print "textfield updated" End Select Case EVENT_WINDOWCLOSE End End Select Wend Function ReadOnlyCallback(event:TEvent,context:Object) Return 0 ' Never allow edit. EndFunction |