Cursor jumps to the begin of Line after leaving the window

This forum is for eXpress++ general support.
Message
Author
eckard
Posts: 16
Joined: Sun Jun 21, 2015 12:24 am

Cursor jumps to the begin of Line after leaving the window

#1 Post by eckard »

My Problem is the following.
The cursor is somewhere in one Line.
When I leave my eXpress window and come back after doing other things in another Window, the cursor is not longer in the same position. He is always in the first position of the line.
What must I do, that my eXpress Window will remembe the old cursor-position before leaving the window?
Hope for help.
Thank you

User avatar
rdonnay
Site Admin
Posts: 4729
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

#2 Post by rdonnay »

To fix this problem for you I had to make modifications to 2 eXpress++ source files.
There are in the attached zip file.

I had to be sure that this fix would not break any existing applications.
I feel confident about that.

Copy the 2 source files to your \exp20\source\dclipx folder and then run BUILD20.BAT or BUILD19_SL1.BAT to rebuild DCLIPX.DLL.

This fix will be in the next build.
Attachments
LastFocus.zip
(102.8 KiB) Downloaded 818 times
The eXpress train is coming - and it has more cars.

eckard
Posts: 16
Joined: Sun Jun 21, 2015 12:24 am

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

#3 Post by eckard »

rdonnay wrote:To fix this problem for you I had to make modifications to 2 eXpress++ source files.
There are in the attached zip file.

I had to be sure that this fix would not break any existing applications.
I feel confident about that.

Copy the 2 source files to your \exp20\source\dclipx folder and then run BUILD20.BAT or BUILD19_SL1.BAT to rebuild DCLIPX.DLL.

This fix will be in the next build.

eckard
Posts: 16
Joined: Sun Jun 21, 2015 12:24 am

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

#4 Post by eckard »

Thank you very much but it does not work. I rebuild the DBCLIPX succesfull with BUILD20.BAT

The cursor is on position 1 of the DCGET-line and not on its old position when I come back from another window. With the old Alaska-Programm the cursor remains on its old position in the GET-Line when I come back from another window.

Sorry - perhaps you will find a solution.

User avatar
rdonnay
Site Admin
Posts: 4729
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

#5 Post by rdonnay »

It works with all of my programs.

I will need a test program from you that demonstrates that it does not work.
The eXpress train is coming - and it has more cars.

eckard
Posts: 16
Joined: Sun Jun 21, 2015 12:24 am

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

#6 Post by eckard »

Hallo Roger,
may I send you my whole programm, wich was improved by Michael Rudrich??
I would zip it with small DBF's. I am not fit enough to build something new with eXpress.
Please give me an answer by eMail to

eboettcher@axon.de

Of course I would pay for your work.
Perhaps you also can solve the problems with the TIMEOUT sequences, Michael integrated in some parts.
They will not work, when I activate them. The whole programm shall close when 30 minutes nothing happens. From each part of the programm.

Servus
Eckard

User avatar
rdonnay
Site Admin
Posts: 4729
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

#7 Post by rdonnay »

Eckard -

Yes, it will be fine to send me your whole program.

Of course, I will need everything to run and build it.

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

eckard
Posts: 16
Joined: Sun Jun 21, 2015 12:24 am

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

#8 Post by eckard »

Hallo Roger,
how can I send you the ZIP-File?
Can you give me your Mail-Adress or is there another way?
I wish you a nice Sunday
Eckard

User avatar
rdonnay
Site Admin
Posts: 4729
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

#9 Post by rdonnay »

Do you know how to send files via FTP?

I will give you the FTP credentials via private email.
Please send me an email to rogerdonnay@donnay-software.com.
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

#10 Post by Cliff Wiernik »

This change does break my application. I have posted a comment recently describing the problem but have not had a reply. Basically, when using colorgets and hilitegets, when going into editmode the field is automatically highlighted and move to the end of the input data. If it is a single character get field, the cursor is beyond the file and to change the value you have to first hit backspace in order to be able to enter a key.

I have looked at the code changes and they are mainly in the _dcxbpgt.prg with some in _dcgetbx.prg

The previous code was:

Code: Select all

  
  ::killInputFocus := {|x,y,o|  ;
                        IIF(::isGetDataOnLostFocus,o:getData(),nil), ;
                        IIF(::isGetDataOnLostFocus,o:setData(),nil), ;
                        o:home(), ;
                        DC_HiliteGets(o,2,o:getList:getOptions[nGETOPT_HILITECOLOR]), ;
                        DC_ColorGets(o,2,o:getList:getOptions[aGETOPT_COLORGETS]), ;
                        _PopupButtonShow(o,.f.)}
  ::setInputFocus := {|x,y,o| ;
                       o:DateFlag := .T., ;
                       o:Home(), ;
                       DC_HiliteGets(o,1,o:getList:getOptions[nGETOPT_HILITECOLOR]), ;
                       DC_ColorGets(o,1,o:getList:getOptions[aGETOPT_COLORGETS]), ;
                       _PopupButtonShow(o,.t.)}
This has been replaced with:

Code: Select all

  
  ::killInputFocus := DC_XbpGetKillInputFocusBlock(nil,self)
  ::setInputFocus := DC_XbpGetSetInputFocusBlock()
It appears the changes were designed to use the DC_XbpGetKillInputFocusBlock() and DC_XbpGetSetInputFocus() and allow the default blocks to be overriden. I need to know how to revert the behavior back to the previous code without having to revert to changing Express with each build.

You were concerned about breaking existing code and I think this change does.

Cliff

Post Reply