GetGadgetState() for EditorGadget()

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
BarryG
Addict
Addict
Posts: 4136
Joined: Thu Apr 18, 2019 8:17 am

GetGadgetState() for EditorGadget()

Post by BarryG »

I could've sworn that GetGadgetState() used to return the line number where the cursor was on the EditorGadget() in the past, but I can't find any evidence of that now. Oh well. I need it because GetGadgetItemText() returns the text of the specified line in the EditorGadget(), so currently I'm getting the cursor line number like this (thanks to netmaestro):

Code: Select all

SendMessage_(GadgetID(gad),#EM_LINEFROMCHAR,-1,0)
So could GetGadgetState() for the EditorGadget() do the same thing? The command isn't supported by the EditorGadget() at this time, so it's free.

Thanks!