Four Js Development Tools Forum

Discussions by product => Genero BDL => Topic started by: Snorri B. on February 25, 2010, 07:38:31 pm



Title: Input question
Post by: Snorri B. on February 25, 2010, 07:38:31 pm
Hi.

I have a input by name with one field as a part of a dialog unbuffered. What I want to achieve is this:
When I enter the Input statement the field (leita) has a certain value. I want to position the cursor at the end of the field, and I want the value of the field NOT to be highlighted (selected). Something like:
Code
  1. dialog attributes(unbuffered)
  2.    display array p_d[rec] to listi.* attributes(count=norecs[rec], keep current row)
  3.    .
  4.    .
  5.    .
  6.  
  7.    on action char_leit
  8.       if leita is null  then
  9.         let leita=cstaf
  10.        else
  11.         let leita = leita, cstaf
  12.       end if
  13.       next field leita
  14.   end display
  15.   input by name leita
  16.      before input
  17.        call fgl_dialog_setselection(0,0)
  18.        call fgl_dialog_setcursor(length(leita))
  19.    end input
  20. end dialog
  21.  

Can this be achieved? In the code above, the cursor is never positioned at the end and using length+1 doesn't work either. If the field only has one character the character gets selected.

Best regards,
-Snorri


Title: Re: Input question
Post by: Snorri B. on February 26, 2010, 04:33:36 pm
OK, I found out how this can be done.  fgl_dialog_setcursor(length(leita)+1) works only if the field is textedit.

Best regs,
-Snorri