Center caption on ribbon

Center caption on ribbon

Postby Otto » 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: Select all  Expand view

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
 

Image

Image
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6329
Joined: Fri Oct 07, 2005 7:07 pm

Re: Center caption on ribbon

Postby Antonio Linares » Mon Dec 21, 2009 7:34 am

Otto,

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

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42081
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Center caption on ribbon

Postby Otto » Mon Dec 21, 2009 9: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
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6329
Joined: Fri Oct 07, 2005 7:07 pm

Re: Center caption on ribbon

Postby Antonio Linares » Tue Dec 22, 2009 8:38 pm

Otto,

Have you tried using Chr( 255 ) ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42081
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Center caption on ribbon

Postby Otto » Tue Dec 22, 2009 10:19 pm

Hello Antonio,
chr(255) does not work.
Best regards,
Otto

Image
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6329
Joined: Fri Oct 07, 2005 7:07 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 98 guests