Subscribe for automatic updates: RSS icon RSS

Login icon Sign in for full access | Help icon Help
Advanced search

Pages: [1]
  Reply  |  Print  
Author Topic: Input question  (Read 8073 times)
Snorri B.
Posts: 104


« 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
Snorri B.
Posts: 104


« Reply #1 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
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines