Hi
I am looking for a possibility to position the cursor in a get in an eval clause behind the last existing
letter without the need to press xbeK_END first..
Had no success with the XBase methods..
There's a method :Home() in the DC_XbpGet class - but no corresponding :End()
Thks
- MIchael
Sample code:
#include "DCDIALOG.CH"
#include "APPEVENT.CH"
Procedure Main
Local Getlist := {}, Getoptions
Local cTestVar := "Hello "
@ 1,1 DCGET cTestVar PICTURE "XXXXX99999" ;
EVAL {|o|PostAppEvent(xbeP_Keyboard, xbeK_END,,o) }
DCGETOPTIONS NOMINBUTTON NOMAXBUTTON
DCREAD GUI FIT MODAL TITLE "Test" BUTTONS DCGUI_BUTTON_EXIT OPTIONS GetOptions
return
Positioning a cursor in a GET behind the last char
-
- Posts: 33
- Joined: Wed Jan 27, 2010 10:23 pm
Re: Positioning a cursor in a GET behind the last char
Hi, Michl.
@ 1,1 DCGET cTestVar PICTURE "XXXXX99999" OBJECT oGet ;
EVAL {|o|o:SetInputFocus := {||PostAppEvent(xbeP_Keyboard, xbeK_END,,oGet)} }
Best regards,
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
-
- Posts: 33
- Joined: Wed Jan 27, 2010 10:23 pm
Re: Positioning a cursor in a GET behind the last char
Hi Tom..
good idea - but no change...
- Michael
good idea - but no change...
- Michael
Re: Positioning a cursor in a GET behind the last char
Hi, Michl.
This positiones the cursor to the end of the get, however it receives focus. Did you notice I named the get? (But this shouldn't make any difference - however, it effected the SetDisplayFocus-codeblock).
This positiones the cursor to the end of the get, however it receives focus. Did you notice I named the get? (But this shouldn't make any difference - however, it effected the SetDisplayFocus-codeblock).
Code: Select all
#include "dcdialog.ch"
#include "appevent.ch"
#pragma library("dclipx.lib")
PROCEDURE appsys() ; RETURN
PROCEDURE MAIN()
Local Getlist := {}, Getoptions
Local cTestVar := "Hello ", cTestVar2 := "World", oGet, oGet2
@ 1,1 DCGET cTestVar PICTURE "XXXXX99999" OBJECT oGet ;
EVAL {|o|o:SetInputFocus := {||PostAppEvent(xbeP_Keyboard, xbeK_END,,oGet)} }
@ 3,1 DCGET cTestVar2 PICTURE "XXXXX99999" OBJECT oGet2 ;
EVAL {|o|o:SetInputFocus := {||PostAppEvent(xbeP_Keyboard, xbeK_END,,oGet2)} }
DCGETOPTIONS NOMINBUTTON NOMAXBUTTON
DCREAD GUI FIT MODAL TITLE "Test" BUTTONS DCGUI_BUTTON_EXIT OPTIONS GetOptions ENTEREXIT
return
Best regards,
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
-
- Posts: 33
- Joined: Wed Jan 27, 2010 10:23 pm
Re: Positioning a cursor in a GET behind the last char
Tom
thanks - I found my mistake..
I've coded {|o|Set... instead of {|o|o:Set....
;o)
- Michael
thanks - I found my mistake..
I've coded {|o|Set... instead of {|o|o:Set....
;o)
- Michael