Hello.
I hope you are well.
I am having problems with the cursor position in certain situations after clearing a variable in the dcsay get command.
I made a small program to reproduce the problem.
Run the Exe and type 1234.
The cursor must always appear aligned to the left.
In this case this does not happen, and it is causing problems in my applications.
Any idea or recommendation would be great ..
Many Thanks in advance..
Wrong Position Cursor after reset Field
Wrong Position Cursor after reset Field
- Attachments
-
- Teste_2026.rar
- (8.19 KiB) Downloaded 819 times
Pedro Alexandre
Re: Wrong Position Cursor after reset Field
I don't understand.
Are you saying that when you click in a GET that already has focus, you want it go always go home?
If that is what you want then do this:
It will automatically go home when the GET receives focus.
Are you saying that when you click in a GET that already has focus, you want it go always go home?
If that is what you want then do this:
Code: Select all
@ 2,01 dcsay ' Fied 4' get cCampo4 GETSIZE 40,1 ;
Valid {|| Testa(@GetList) } Parent POS GETSIZE 40,1 ;
GETEVAL {|o|o:lbClick := {|a,b,o|o:home()}}
The eXpress train is coming - and it has more cars.
-
- Posts: 484
- Joined: Wed Jan 27, 2010 10:25 pm
- Location: Berlin Germany
Re: Wrong Position Cursor after reset Field
I think, Roger made a get/set function for that. Place this in your main procedure:
Code: Select all
DC_XbpGetSetInputFocusBlock( {|x,y,o|nil, ;
IIF(!Empty(o:get:buffer),o:get:pos := o:savePos,nil), ;
o:DateFlag := .T., ;
o:Home(), ;
DC_HiliteGets(o,1,o:getList:getOptions[nGETOPT_HILITECOLOR]), ;
DC_ColorGets(o,1,o:getList:getOptions[aGETOPT_COLORGETS]), ;
nil} )
_______________________
Best Regards
Wolfgang
Best Regards
Wolfgang
Re: Wrong Position Cursor after reset Field
Roger!
what I mean is that the cursor does not stay at the beginning of the field when back from the testa() function that is in the valid clause.
You can see that by typing 1234 on the get and press enter and enter.
the normal behavior of the cursor in any field when it gets focus is to stay at the beginning of the field.
This is not what works well in this situation.
Can someone test this situation and confirm that it also happens?
I'm compiling on Win10 64 Bit, xBase 2.0.1176, eXpress 267
what I mean is that the cursor does not stay at the beginning of the field when back from the testa() function that is in the valid clause.
You can see that by typing 1234 on the get and press enter and enter.
the normal behavior of the cursor in any field when it gets focus is to stay at the beginning of the field.
This is not what works well in this situation.
Can someone test this situation and confirm that it also happens?
I'm compiling on Win10 64 Bit, xBase 2.0.1176, eXpress 267
Pedro Alexandre
- slobodan1949
- Posts: 88
- Joined: Mon Apr 25, 2011 8:57 am
- Location: SERBIA
- Contact:
Re: Wrong Position Cursor after reset Field
Interesting.
For me, everything works correctly with the following code change:
@ 2,01 dcsay ' Fied 4' get cCampo4 GETSIZE 40,1 LOSTFOCUS {|| Testa(@GetList) } Parent POS GETSIZE 40,1
For me, everything works correctly with the following code change:
@ 2,01 dcsay ' Fied 4' get cCampo4 GETSIZE 40,1 LOSTFOCUS {|| Testa(@GetList) } Parent POS GETSIZE 40,1