Cursor jumps to the begin of Line after leaving the window

This forum is for eXpress++ general support.
Message
Author
User avatar
rdonnay
Site Admin
Posts: 4728
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Cursor jumps to the begin of Line after leaving the wind

#11 Post by rdonnay »

I thought I made those changes for you.
Now you are saying they don't work?

I don't know what to do.
Apparently we need to have another long conversation about this.

The reason I replaced the callbacks with get-set functions for posting your own code block, is so programmers can make it behave any way they want.

You should be able to give it the old functionality by returning the old code block from the Get-Set function.
I'm trying to understand why this is suddenly a problem for you.

Are you saying that you are just now getting around to using build 265?
The eXpress train is coming - and it has more cars.

Cliff Wiernik
Posts: 605
Joined: Thu Jan 28, 2010 9:11 pm
Location: Steven Point, Wisconsin USA
Contact:

Re: Cursor jumps to the begin of Line after leaving the wind

#12 Post by Cliff Wiernik »

Roger,

You did not make these changes for me. Your posted them for user Eckard 1/29/17. I was using Express 264 at that time and did not load or use them. The problem came to front when I started testing Express 265, release 5/19/17. I reported the problem 6/2/17 in a different thread with detailed pictures but that thread was not responded to.

Cliff

User avatar
rdonnay
Site Admin
Posts: 4728
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Cursor jumps to the begin of Line after leaving the wind

#13 Post by rdonnay »

I must have missed that thread.
That's when I was on a short vacation in Oregon.

I will get to it soon.
The eXpress train is coming - and it has more cars.

Cliff Wiernik
Posts: 605
Joined: Thu Jan 28, 2010 9:11 pm
Location: Steven Point, Wisconsin USA
Contact:

Re: Cursor jumps to the begin of Line after leaving the wind

#14 Post by Cliff Wiernik »

I think that was correct. I think if you send a code block with the prior code sample from the 264 build, it reverts the 265 treatment back. That should work.

Wolfgang Ciriack
Posts: 479
Joined: Wed Jan 27, 2010 10:25 pm
Location: Berlin Germany

Re: Cursor jumps to the begin of Line after leaving the wind

#15 Post by Wolfgang Ciriack »

Is there a way to put this back to 264 behavior ?
I am still testing version 265, and the cursor is set in a numeric field not always to the beginning of the field.
It is depending of the content of the numeric field. I will try to make a little test program.
_______________________
Best Regards
Wolfgang

Wolfgang Ciriack
Posts: 479
Joined: Wed Jan 27, 2010 10:25 pm
Location: Berlin Germany

Re: Cursor jumps to the begin of Line after leaving the wind

#16 Post by Wolfgang Ciriack »

Hello Roger,
attached is a test program, which shows the behavior with the cursor in numeric fields:
First time the cursor is set to the beginning of the get field, so if you enter a number, the number is correct.
Second time you enter the numeric field, the cursor position depends on the last inserted number.
If you have a input of 12.00 the cursor is on the 2, if you have 123.00 the cursor is on the first 0.
This is only with version 265, with 264 it was right (always on the first position).
Attachments
Exp265test2.zip
(273.73 KiB) Downloaded 731 times
_______________________
Best Regards
Wolfgang

User avatar
rdonnay
Site Admin
Posts: 4728
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Cursor jumps to the begin of Line after leaving the wind

#17 Post by rdonnay »

Ok, I will look at this today.
The eXpress train is coming - and it has more cars.

Wolfgang Ciriack
Posts: 479
Joined: Wed Jan 27, 2010 10:25 pm
Location: Berlin Germany

Re: Cursor jumps to the begin of Line after leaving the wind

#18 Post by Wolfgang Ciriack »

Hello Roger,
do you find a solution for this problem ?
_______________________
Best Regards
Wolfgang

User avatar
rdonnay
Site Admin
Posts: 4728
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Cursor jumps to the begin of Line after leaving the wind

#19 Post by rdonnay »

Build 265 (and later) contains a new Get-Set function: DC_XbpGetSetInputFocusBlock().

This was added to override the default behavior when a GET receives input focus.

Unfortunately, the default changed after build 264. That was a mistake and will be corrected in build 266.

For now, you can override that behavior by adding the below code to the beginning of your applications:

Code: Select all

bSetFocus := {|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}

DC_XbpGetSetInputFocusBlock(bSetFocus)
The eXpress train is coming - and it has more cars.

Wolfgang Ciriack
Posts: 479
Joined: Wed Jan 27, 2010 10:25 pm
Location: Berlin Germany

Re: Cursor jumps to the begin of Line after leaving the wind

#20 Post by Wolfgang Ciriack »

Ok, thank you, i will continue testing.
_______________________
Best Regards
Wolfgang

Post Reply