Disable "CTRL-C" for certain textareas?

BlitzMax Forums/BlitzMax GUI Programming/Disable "CTRL-C" for certain textareas?

The Forum Archive is locked. These are the original blitzbasic.com forums, kept so their posts can still be read and searched. No new topics, replies or edits can be made here. To join the conversation, head over to the Blitz3D+ forums.

Ok, can still be done, but is a bit more complex by using a TextFilter.
Try the example below and change it to your needs...

SetGadgetFilter( TextArea1:TGadget, TextArea1_Filter )


Function TextArea1_Filter:Int( event:TEvent,context:Object )
	DebugLog "TextArea TextArea1 filtering text input: "+Chr(Event.data)+"="+Event.Data+","+Event.Mods
	Select Event.ID
	    Case EVENT_KEYDOWN
	        If Event.Data = KEY_BACKSPACE Then Return True
	        If Event.Data = KEY_DELETE Then Return True
	    Case EVENT_KEYCHAR
	        If Event.Data => KEY_0 And Event.Data <= KEY_9 Then Return True
	        If Event.Data => KEY_A And Event.Data <= KEY_Z Then Return True
	        If Event.Data => 97 And Event.Data <= 122 Then Return True
	        If Event.Data = KEY_BACKSPACE Then Return True
	End Select
	Return False
End Function