Frame and editbox (possible corrections)

Moderator: Rathinagiri

Rossine
Posts: 87
Joined: Thu Jun 30, 2011 10:04 pm

Frame and editbox (possible corrections)

Post 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.
Ricci
Posts: 255
Joined: Thu Nov 19, 2009 2:23 pm

Re: Frame and editbox (possible corrections)

Post 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? ;-)
Rossine
Posts: 87
Joined: Thu Jun 30, 2011 10:04 pm

Re: Frame and editbox (possible corrections)

Post 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.
Ricci
Posts: 255
Joined: Thu Nov 19, 2009 2:23 pm

Re: Frame and editbox (possible corrections)

Post 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.
Rossine
Posts: 87
Joined: Thu Jun 30, 2011 10:04 pm

Re: Frame and editbox (possible corrections)

Post 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.
mrduck
Posts: 497
Joined: Fri Sep 10, 2010 5:22 pm

Re: Frame and editbox (possible corrections)

Post 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..
User avatar
l3whmg
Posts: 694
Joined: Mon Feb 23, 2009 8:46 pm
Location: Italy
Contact:

Re: Frame and editbox (possible corrections)

Post 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
Luigi from Italy
www.L3W.it
Rossine
Posts: 87
Joined: Thu Jun 30, 2011 10:04 pm

Re: Frame and editbox (possible corrections)

Post 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 7344 times
Best Regards,

Rossine.
Rossine
Posts: 87
Joined: Thu Jun 30, 2011 10:04 pm

Re: Frame and editbox (possible corrections)

Post 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.
User avatar
l3whmg
Posts: 694
Joined: Mon Feb 23, 2009 8:46 pm
Location: Italy
Contact:

Re: Frame and editbox (possible corrections)

Post 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
Luigi from Italy
www.L3W.it
Post Reply