Page 1 of 1

DCGET focus on mouseclick

Posted: Mon Feb 22, 2010 7:27 am
by Markus Walter
Hello Roger,

at 5/4/2009 Tom Liehr starts this Thread in old webboard. It is about how the cursor should be positioned after clicking in a dcget. Did you found time to look into this?

I think you could/should make two improvements:
1. Clicking in "space" after real characters should bring the cursor after the last "real" character.
2. Clicking at a position where are "real" characters should bring the cursor to this position. If focus come from another dcget this should the same. Now it seems to me, that this only works, if the dcget has the focus.

Behavior now:
1. Cursor is at mouse-click-position
2. Cursor is at position 1 or text is marked from first position to mouse-click-position (if you are "coming" from another dcget)

Both is not "windows standard" and not Xbase-Standard.

Test-Code:

Code: Select all

#include "dcdialog.ch"

function Appsys()
return NIL

procedure main()
local getlist := {}, getoptions := {}, lRet
local cVar1 := padr("Test 1", 20), cVar2 := padr("Test 2", 20)

  readinsert(.t.)

  @ 3, 3 DCGET cVar1
  @ 4, 3 DCGET cVar2

  DCGETOPTIONS TITLE "Test"
  DCREAD GUI TO lRet OPTIONS getoptions ADDBUTTONS FIT

RETURN


Re: DCGET focus on mouseclick

Posted: Mon Feb 22, 2010 8:53 am
by rdonnay
I believe that I satisfied Tom's requirement in build 253.

Re: DCGET focus on mouseclick

Posted: Mon Feb 22, 2010 9:38 am
by Markus Walter
Hi Roger,

therefore i made the suggestion for the "Changes"-Thread.

@Tom:
Did you use 253? Is the behaviour like expected?
Perhaps you can test the "Cutting with ContextMenu 'eats buffer"-problem, too :pray: Thanks.

Re: DCGET focus on mouseclick

Posted: Mon Feb 22, 2010 10:07 am
by Tom
Hi, Markus.

No eaten buffer with build 253. :happy-cheerleadersmileyguy:

A click into numeric gets works as expected.

Re: DCGET focus on mouseclick

Posted: Tue Feb 23, 2010 1:11 am
by Markus Walter
Tom wrote:Hi, Markus.

No eaten buffer with build 253. :happy-cheerleadersmileyguy:

A click into numeric gets works as expected.
Thanks. What about click in alpha-gets? See my both scenarios in first posting, please. Are both okay with 253?