GetSelStart

Started by Tyrone Lee, April 24, 2008, 11:21:32 PM

Previous topic - Next topic

Tyrone Lee

I am trying to save the current cursor position within a textbox. Within VB I can save the SelStart of a Textbox, and reset the SelStart when I am done editing.

I see that firefly has the FF_TEXTBOX_GETSELSTART, but what about FF_TEXTBOX_SETSELSTART. I don't have a particular "word" that is being selected, just want to position the cursor.

Any idea?

TechSupport

In this case you could use the FF_TextBox_SetSel function. For example, to set the cursor after the 3rd character in a TextBox you would use the following:


   FF_TextBox_SetSel hWndControl, 3, 3


A logical place to put that code would be in the EN_SETFOCUS message handler.


Tyrone Lee

Yea.. But that function doesn't exist. Its not showing up in my commands.

TechSupport

That's strange. I just fired up a FireFly 2 blank project and when I typed in FF_TextBox_SetSel it immediately turned "blue" indicating that it is a keyword. It is also listed in the FireFly Functions Help file under "Controls", "TextBox Functions".

In "Environment Options", make sure that under "Code Generation" that you do not have "Force bypass checking of rFireFly functions" checked.

If none of this works then what is the date/time stamp on the "FF_Functions.src" file in your FireFly installation directory?