bb.donnay-software.com

Donnay Software Web Forums
It is currently Wed Aug 05, 2020 3:07 pm

All times are UTC - 7 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Thu May 28, 2020 11:28 am 
Offline
User avatar

Joined: Tue Feb 09, 2010 3:06 am
Posts: 137
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..


Attachments:
Teste_2026.rar [8.19 KiB]
Downloaded 82 times

_________________
Pedro Alexandre
Top
 Profile  
 
PostPosted: Sat May 30, 2020 4:34 pm 
Offline
Site Admin
User avatar

Joined: Wed Jan 27, 2010 6:58 pm
Posts: 4144
Location: Boise, Idaho USA
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:
Code:
@ 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()}}

It will automatically go home when the GET receives focus.

_________________
The eXpress train is coming - and it has more cars.


Top
 Profile  
 
PostPosted: Sat May 30, 2020 11:44 pm 
Offline

Joined: Wed Jan 27, 2010 10:25 pm
Posts: 354
Location: Berlin Germany
I think, Roger made a get/set function for that. Place this in your main procedure:
Code:
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


Top
 Profile  
 
PostPosted: Mon Jun 01, 2020 2:17 am 
Offline
User avatar

Joined: Tue Feb 09, 2010 3:06 am
Posts: 137
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

_________________
Pedro Alexandre


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: Google [Bot] and 21 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group