Page 1 of 2

Frame and editbox (possible corrections)

Posted: Mon Dec 26, 2011 8:11 pm
by Rossine
Hello,

1) It would be possible to create "frame" the clause "NOTABSTOP".

2) In "Editbox" when I press "TAB" he is not jumping the focus to the next object.

Best Regards,

Rossine.

Re: Frame and editbox (possible corrections)

Posted: Mon Dec 26, 2011 9:11 pm
by Ricci
1) FRAME still has it:

Code: Select all

DEFINE FRAME	 oFrame
    ROW 10
    COL 10
    WIDTH 100
    HEIGHT  20
    TABSTOP .F.
END FRAME
2) Editbox work like a real text editor. What happen if you press the Tab key in Word? ;-)

Re: Frame and editbox (possible corrections)

Posted: Mon Dec 26, 2011 9:50 pm
by Rossine
Hello Ricci,

Code: Select all

DEFINE FRAME	 oFrame
    ROW 10
    COL 10
    WIDTH 100
    HEIGHT  20
    TABSTOP .F.
END FRAME
This did not work here :(

>> 2) Editbox work like a real text editor. What happen if you press the Tab key in Word? ;-)

But hmg.3 pressing TAB, the next object receives focus. Perhaps it would be interesting if we could
have an option to use the TAB in editing or jump to the next field. This is just a suggestion ;)

Thanks for the feedback,

Rossine.

Re: Frame and editbox (possible corrections)

Posted: Tue Dec 27, 2011 6:42 am
by Ricci
Rossine wrote:Hello Ricci,

Code: Select all

DEFINE FRAME	 oFrame
    ROW 10
    COL 10
    WIDTH 100
    HEIGHT  20
    TABSTOP .F.
END FRAME
This did not work here :(
Strange ... I have a lot of frames in my program and they don't get the focus when using tab.

Do you use the actual SVN or the last HMG4 download paket?
"Project developers table" is for discussion about the current SVN.

Re: Frame and editbox (possible corrections)

Posted: Tue Dec 27, 2011 11:25 am
by Rossine
Hello Ricci,

I use current version SVN and "tabstop .F." work´s now. I must have made some confusion here, but if I click on the title of the frame then yes it receives focus. One might not allow this too ?

Best Regards,

Rossine.

Re: Frame and editbox (possible corrections)

Posted: Tue Dec 27, 2011 11:58 am
by mrduck
Rossine wrote:Hello Ricci,

I use current version SVN and "tabstop .F." work´s now. I must have made some confusion here, but if I click on the title of the frame then yes it receives focus. One might not allow this too ?

Best Regards,

Rossine.
in source/frame.prg add a remark in the setFocusPolicy line

Code: Select all

   ::oQtFont := ::oQTObject:Font()
//   ::oQtObject:setFocusPolicy( Qt_StrongFocus )  <=== remark this line
//   ::oQtObject:setAutoFillBackground( .T. )
Of course you have to compile the library again..

Re: Frame and editbox (possible corrections)

Posted: Tue Dec 27, 2011 12:06 pm
by l3whmg
Hi Rossine.
Perhaps some QT objects handle/got focus and someone only if you click over.... We must do a check/test for everyone with current OnGotFocus / OnLostFocus method. On the other hand, as I wrote in other post but nobody write an answer, I think we must defines a list of default handling for every object; for example: I think LABEL must be TABSTOP := .F. by default and so on.

Cheers

Re: Frame and editbox (possible corrections)

Posted: Tue Dec 27, 2011 12:22 pm
by Rossine
Hello Francesco,
in source/frame.prg add a remark in the setFocusPolicy line

Code: Select all

   ::oQtFont := ::oQTObject:Font()
//   ::oQtObject:setFocusPolicy( Qt_StrongFocus )  <=== remark this line
//   ::oQtObject:setAutoFillBackground( .T. )
Of course you have to compile the library again..
I did as you said but still, by clicking the mouse on the frame and still receives the focus.
frame.png
frame.png (2.52 KiB) Viewed 9563 times
Best Regards,

Rossine.

Re: Frame and editbox (possible corrections)

Posted: Tue Dec 27, 2011 12:40 pm
by Rossine
Hi Luigi,

It would be interesting if each object could have a different treatment. From the moment that the object was defined as "TABSTOP. F." too by clicking on it, he not could receive the focus. Maybe this would be the ideal behavior ;)

Best Regards,

Rossine.

Re: Frame and editbox (possible corrections)

Posted: Tue Dec 27, 2011 1:14 pm
by l3whmg
Hi Rossine.
Please don't confuse TABSTOP with focusing.
1) TABSTOP means: when I press TAB key (or SHIFT+TAB) the object will be skipped or not.
2) Some objects "can be / are skipped" by default: we must check HMG3 behavior. F.e. regarding MainMenu, StatusBar, Tab and TabPage and so on.
3) Other objects are NOT skipped by default. F.e. TEXTBOX is always enabled and when you press TAB (or ENTER with "SET NAVIGATION....") you can jump on it from "previous" object.

Different behaviour is the focusing:
1) If I use click a lot of objects can receive the focus. What I means is: everytime I'm using the mouse click the object is/can be focused.
2) If I'm using tabbing system (TAB o SHIFT+TAB) and related TABSTOP is true, then the object is "focused" when I jump on it.

Cheers