FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Center caption on ribbon
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Center caption on ribbon
Posted: Sun Dec 13, 2009 10:07 AM
The code is working but on taskbar only 3 points are shown.
Does someone have a better solution?
Best regards,
Otto
Code (fw): Select all Collapse
function onresize(oWnd)
local nSpaceWidth  := oWnd:GetWidth(" ", )
local cCaption:= "RibbonBar Test " + FWVERSION
local nSpaces := 0
local nSpaceBTNs := 140

nSpaces :=  ( oWnd:nWidth - nSpaceBTNs - oWnd:GetWidth(cCaption, ) ) / 2  / nSpaceWidth
oWnd:cTitle( space( nSpaces ) + cCaption )

return nil



Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Center caption on ribbon
Posted: Mon Dec 21, 2009 07:34 AM

Otto,

Have you tried to use tabs (Chr( 9 )) instead of spaces (Chr(32)) ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: Center caption on ribbon
Posted: Mon Dec 21, 2009 09:50 AM

Hello Antonio,
TAB does not work on the caption. If I insert TAB the caption remains on the left side.
Best regards,
Otto

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Center caption on ribbon
Posted: Tue Dec 22, 2009 08:38 PM

Otto,

Have you tried using Chr( 255 ) ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: Center caption on ribbon
Posted: Tue Dec 22, 2009 10:19 PM
Hello Antonio,
chr(255) does not work.
Best regards,
Otto

Continue the discussion