Page 1 of 1

When StatusBar and Bottom ToolBar

Posted: Wed May 21, 2014 8:53 pm
by Pablo César
When is necessary to make two ToolBars (manually, because via IDE is not possible) one Top another Bottom and you increase a StatusBar: all ToolButtons (Bottom ones) are not displayed in the right size. In order words, the ToolBar Bottom is not calculating to be displayed upper than StatusBar. So, seems Statusbar is taking place part of ToolButtons (bottom) and can not be completly displayed.

This is a fmg file example:

Code: Select all

DEFINE WINDOW TEMPLATE AT 132 , 235 WIDTH 560 HEIGHT 400 VIRTUAL WIDTH Nil VIRTUAL HEIGHT Nil TITLE "Hello ToolBar!!!" ICON NIL MAIN CURSOR NIL ON INIT Nil ON RELEASE Nil ON INTERACTIVECLOSE Nil ON MOUSECLICK Nil ON MOUSEDRAG Nil ON MOUSEMOVE Nil ON SIZE Nil ON MAXIMIZE Nil ON MINIMIZE Nil ON PAINT Nil BACKCOLOR NIL NOTIFYICON NIL NOTIFYTOOLTIP NIL ON NOTIFYCLICK Nil ON GOTFOCUS Nil ON LOSTFOCUS Nil ON SCROLLUP Nil ON SCROLLDOWN Nil ON SCROLLLEFT Nil ON SCROLLRIGHT Nil ON HSCROLLBOX Nil ON VSCROLLBOX Nil

    DEFINE TOOLBAR ToolBar_1 BUTTONSIZE 85,85 FONT "Arial" SIZE 9 FLAT BORDER
        BUTTON button1 CAPTION "Button 1" PICTURE "button1.bmp" ACTION MsgInfo("1") TOOLTIP "ToolTip 1" GROUP
        BUTTON button2 CAPTION "Button 2" PICTURE "button2.bmp" ACTION MsgInfo("2") TOOLTIP "ToolTip 2"
        BUTTON button3 CAPTION "Button 3" PICTURE "button3.bmp" ACTION MsgInfo("3") TOOLTIP "ToolTip 3"
    END TOOLBAR
	
    DEFINE TOOLBAR ToolBar_2 BUTTONSIZE 160,80 FONT "Arial" SIZE 9 BOTTOM RIGHTTEXT BORDER
        BUTTON button4 CAPTION "Button 4" PICTURE "button1.bmp" ACTION MsgInfo("1") TOOLTIP "ToolTip 1" GROUP
        BUTTON button5 CAPTION "Button 5" PICTURE "button2.bmp" ACTION MsgInfo("2") TOOLTIP "ToolTip 2"
        BUTTON button6 CAPTION "Button 6" PICTURE "button3.bmp" ACTION MsgInfo("3") TOOLTIP "ToolTip 3"
    END TOOLBAR
	
	DEFINE STATUSBAR FONT "Arial" SIZE 9
        STATUSITEM "Item 1" ACTION MsgInfo("Item 1")
        STATUSITEM "Item 2" WIDTH 50
        CLOCK
        STATUSITEM "Item 3" WIDTH 100
    END STATUSBAR
   
    DEFINE FRAME Frame_1
        ROW    110
        COL    130
        WIDTH  250
        HEIGHT 110
        FONTNAME "Arial"
        FONTSIZE 9
        FONTBOLD .F.
        FONTITALIC .F.
        FONTUNDERLINE .F.
        FONTSTRIKEOUT .F.
        CAPTION "Note:"
        BACKCOLOR NIL
        FONTCOLOR NIL
        OPAQUE .T.
    END FRAME

    DEFINE LABEL Label_1
        ROW    160
        COL    170
        WIDTH  160
        HEIGHT 20
        VALUE "This Window Has a ToolBar!"
        FONTNAME "Arial"
        FONTSIZE 9
        TOOLTIP ""
        FONTBOLD .F.
        FONTITALIC .F.
        FONTUNDERLINE .F.
        FONTSTRIKEOUT .F.
        HELPID Nil
        VISIBLE .T.
        TRANSPARENT .F.
        ACTION Nil
        AUTOSIZE .F.
        BACKCOLOR NIL
        FONTCOLOR NIL
    END LABEL

END WINDOW
Please note captured screen:
Screen.PNG
Screen.PNG (18.64 KiB) Viewed 4526 times
This problem was related from a brazilian PCToledo forum

Re: When StatusBar and Bottom ToolBar

Posted: Thu May 22, 2014 1:48 am
by Javier Tovar
Si Pablo César,

Aquí pasa lo mismo!

Saludos

Re: When StatusBar and Bottom ToolBar

Posted: Thu May 22, 2014 3:43 am
by Rathinagiri
I will see how to solve this. I think Claudio can easily solve this.

When StatusBar and Bottom ToolBar

Posted: Thu May 22, 2014 12:29 pm
by Pablo César
Rathinagiri wrote:I will see how to solve this. I think Claudio can easily solve this.
I believe a new parameter with StatusBar height will be requested prior to call INITTOOLBAR at C function.

Thanks guys for your attention received.

Re: When StatusBar and Bottom ToolBar

Posted: Fri May 23, 2014 4:31 pm
by srvet_claudio
Pablo César wrote:
Rathinagiri wrote:I will see how to solve this. I think Claudio can easily solve this.
I believe a new parameter with StatusBar height will be requested prior to call INITTOOLBAR at C function.

Thanks guys for your attention received.
I will check.

Re: When StatusBar and Bottom ToolBar

Posted: Tue May 27, 2014 8:07 pm
by srvet_claudio
srvet_claudio wrote:
Pablo César wrote:
Rathinagiri wrote:I will see how to solve this. I think Claudio can easily solve this.
I believe a new parameter with StatusBar height will be requested prior to call INITTOOLBAR at C function.

Thanks guys for your attention received.
I will check.
I fixed!
This problem is not a HMG bug, is a Windows system bug.

When StatusBar and Bottom ToolBar

Posted: Tue May 27, 2014 8:59 pm
by Pablo César
Thank you Dr. Soto !
srvet_claudio wrote:This problem is not a HMG bug, is a Windows system bug
:shock:
You mean is an API bug ?
So, you must have offset this failure reading the height of the statusbar as I said, is not it ?

I just read this:
The toolbar default sizing and positioning behaviors can be turned off by setting the CCS_NORESIZE and CCS_NOPARENTALIGN common control styles. Toolbar controls that are hosted by rebar controls must set these styles because the rebar control sizes and positions the toolbar.
At http://msdn.microsoft.com/en-us/library ... s.85).aspx

Re: When StatusBar and Bottom ToolBar

Posted: Tue May 27, 2014 9:41 pm
by srvet_claudio
Pablo César wrote:Thank you Dr. Soto !
srvet_claudio wrote:This problem is not a HMG bug, is a Windows system bug
:shock:
You mean is an API bug ?
So, you must have offset this failure reading the height of the statusbar as I said, is not it ?

I just read this:
The toolbar default sizing and positioning behaviors can be turned off by setting the CCS_NORESIZE and CCS_NOPARENTALIGN common control styles. Toolbar controls that are hosted by rebar controls must set these styles because the rebar control sizes and positions the toolbar.
At http://msdn.microsoft.com/en-us/library ... s.85).aspx
Windows always overlaps the StatusBar and the Bottom ToolBar.
The trick is: when Windows begin to draw the Bottom ToolBar first I move it to up.

When StatusBar and Bottom ToolBar

Posted: Wed May 28, 2014 12:22 am
by Pablo César
srvet_claudio wrote:Windows always overlaps the StatusBar and the Bottom ToolBar.
The trick is: when Windows begin to draw the Bottom ToolBar first I move it to up.
Yeap

When StatusBar and Bottom ToolBar

Posted: Tue Jun 03, 2014 1:50 pm
by Pablo César
Thank you Claudio, now is working perfectly, even if you amke StatusBar after sequence of ToolButtons.
Screen.PNG
Screen.PNG (15.46 KiB) Viewed 4292 times
PERFECTO !