PlanetSquires Forums

Support Forums => Other Software and Code => Topic started by: Tyrone Lee on April 24, 2008, 11:21:32 PM

Title: GetSelStart
Post by: Tyrone Lee on April 24, 2008, 11:21:32 PM
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?
Title: Re: GetSelStart
Post by: TechSupport on April 25, 2008, 08:17:30 AM
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.

Title: Re: GetSelStart
Post by: Tyrone Lee on May 02, 2008, 01:37:08 PM
Yea.. But that function doesn't exist. Its not showing up in my commands.
Title: Re: GetSelStart
Post by: TechSupport on May 02, 2008, 03:04:47 PM
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?