Should be easy to implement on all platforms...
Thanks

Code: Select all
SetGadgetCursor(#Gadget,StartCursorPos,[EndCursorPos])
CursorPos.w = GetGadgetCursor(#Gadget,[EndCursorPos])
Ehm, what I ment was the mouse cursor typeCSAUER wrote:+1. That would be really a benefit. It should suit to all text input gadgets: ComboBox, Editor, String
Maybe it could look like this:I think it makes sense to have a start / end position, as you can have a selection.Code: Select all
SetGadgetCursor(Gadget,StartCursorPos,[EndCursorPos]) GetGadgetCursor(Gadget,[EndCursorPos])
Code: Select all
SetGadgetAttribute(#Gadget,#PB_Input_CursorType,#PB_Cursor_Default)
SetGadgetAttribute(#Gadget,#PB_Input_CursorType,#PB_Cursor_Hand)
CursorType.l = GetGadgetAttribute(#Gadget,#PB_Input_CursorType)
Code: Select all
SetGadgetAttribute(#Gadget,#PB_Input_CursorPosStart,StartPos.w)
SetGadgetAttribute(#Gadget,#PB_Input_CursorPosEnd,EndPos.w)
StartPos.w = GetGadgetAttribute(#Gadget,#PB_Input_CursorPosStart)
EndPos.w = GetGadgetAttribute(#Gadget,#PB_Input_CursorPosEnd)
Looks fine for meCSAUER wrote:This could be solved via a additional GadgetAttribute, like this:
That would keep the commandset as big as it already is.Code: Select all
SetGadgetAttribute(#Gadget,#PB_Input_CursorType,#PB_Cursor_Default) SetGadgetAttribute(#Gadget,#PB_Input_CursorType,#PB_Cursor_Hand) CursorType.l = GetGadgetAttribute(#Gadget,#PB_Input_CursorType)
So my concern could look the same way, of course:What about this idea?Code: Select all
SetGadgetAttribute(#Gadget,#PB_Input_CursorPosStart,StartPos.w) SetGadgetAttribute(#Gadget,#PB_Input_CursorPosEnd,EndPos.w) StartPos.w = GetGadgetAttribute(#Gadget,#PB_Input_CursorPosStart) EndPos.w = GetGadgetAttribute(#Gadget,#PB_Input_CursorPosEnd)