Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scintilla EVENT_GADGETACTION emits when using SetTextAreaText #44

Open
thareh opened this issue Jan 10, 2020 · 2 comments
Open

Scintilla EVENT_GADGETACTION emits when using SetTextAreaText #44

thareh opened this issue Jan 10, 2020 · 2 comments

Comments

@thareh
Copy link
Contributor

thareh commented Jan 10, 2020

Hi,
When using SetTextAreaText with a set pos and length a EVENT_GADGETACTION event emits, doesn't happen on non-scintilla textarea.

SuperStrict

Framework BRL.StandardIO
Import MaxGUI.Drivers
Import MaxGUI.MaxGUITextAreaScintilla
Import BRL.EventQueue

Local Window:TGadget = CreateWindow("Test", 0, 0, 1280, 720, Null, WINDOW_TITLEBAR | WINDOW_CENTER | WINDOW_CLIENTCOORDS | WINDOW_RESIZABLE)

Local Textarea:TGadget = CreateTextArea(0, 0, ClientWidth(Window), ClientHeight(Window), Window)
SetGadgetLayout(Textarea, EDGE_ALIGNED, EDGE_ALIGNED, EDGE_ALIGNED, EDGE_ALIGNED)

SetTextAreaText(Textarea, "testing testing")
SetTextAreaText(Textarea, "test", 4, 4)

Repeat
	
	WaitEvent()
	
	Print CurrentEvent.Tostring()
	
	Select EventID()
		Case EVENT_WINDOWCLOSE
			End
			
	EndSelect
	
Forever

Cheers,
-- Thareh

@thareh
Copy link
Contributor Author

thareh commented Jan 10, 2020

Seems to emit an EVENT_GADGETSELECT event as well.

@woollybah
Copy link
Member

I currently don't have a workaround for this. There appears to be no way in scintilla to determine whether a text change was initiated by the user, or the program... yay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants