Theme support for tToolbar

Theme support for tToolbar

Postby TimStone » Tue Aug 21, 2007 6:23 pm

I'm a bit puzzled. I'm using the TToolbar class, and I expected to see the theme applied to it ... but it doesn't appear to be. I can see that the toolbar background on your newly updated preview class responds to the theme.

Is there a setting I'm missing or is it not supported in 7.07 ?

Tim
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Postby Antonio Linares » Tue Aug 21, 2007 6:57 pm

Tim,

You should have themes support on the toolbar if you are including the themes manifest file in your rc file:

1 24 "WindowsXP.Manifest"

You can find that file at samples\winxp
regards, saludos

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

Toolbar

Postby TimStone » Tue Aug 21, 2007 10:32 pm

Antonio,

I have themes working on virtually everything else. However, I'm getting a flat color for the toolbar.

Tim
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

TOOLBAR theme not working !

Postby TimStone » Wed Aug 22, 2007 4:10 pm

http://www.masterlinksoftware.com/Files/toolbar.bmp

Here is a cut of the main menu in the program. You can see that the menu bar responds to the theme, but clearly the toolbar does not. Also, I have the same result with rpreview

If you think this is correct behavior, it is contrary to the toolbar behavior in all Microsoft applications ...

Tim
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Postby James Bott » Wed Aug 22, 2007 4:29 pm

Tim,

Just a thought. I know you said you are using TToolbar, can you confirm that you are indeed using TToolbar and not FW's own buttonbar (TBar class)?

Also, have you tryed it under XP to see if it is a Vista issue only?

I have never used TToolbar so I don't know what the behavior is.

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Class

Postby TimStone » Wed Aug 22, 2007 7:03 pm

Good morning,

Yes, I'm using tToolbar. I was advised to do this by Antonio a couple of years ago. So ...

The following is the start of the code:

// First create the ImageList object for all the bitmaps
oImageList := TImageList():New( 28, 28 ) // width and height of bitmaps
// Now create the toolbar object for adding the buttons
oToolBar := TToolBar():New( oWnd, 30, 32, oImageList )

From here I actually add the buttons with the following lines:

oImageList:AddMasked( TBitmap():Define( "CLIP", , oWnd ), nRGB( 255, 255, 255 ) )
oToolBar:AddButton( { || PRO100M( )}, "Workorders", ) // "Work" )

Yes, the same result is seen in XP
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Postby Antonio Linares » Wed Aug 22, 2007 7:50 pm

Tim,

Please try samples\rebars.prg. It should look ok with themes.

It seems that higher toolbars don't get the theme look. If you build samples\ToolBar1.prg you'll see that it looks like yours.
regards, saludos

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

Rebars

Postby TimStone » Wed Aug 22, 2007 8:03 pm

So toolbars doesn't work properly...

Tim
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Postby Antonio Linares » Wed Aug 22, 2007 8:07 pm

Tim,

It looks as a standard Windows behavior: Themes are seen only on small height toolbars.

Anyhow when you move the mouse over a toolbar button, you should see the themed button
Image
regards, saludos

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

Small height toolbar ?

Postby TimStone » Wed Aug 22, 2007 8:31 pm

OK ... resolved the problem by putting it onto a tReBar with oPanel ... but is there a way to set the baloon style like what you used ?
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Postby Antonio Linares » Wed Aug 22, 2007 10:01 pm

Tim,

Use the BALLOON clause when creating the toolbar:

DEFINE TOOLBAR oToolBar OF oWnd SIZE 50, 58 ; // 50, 50 ;
IMAGELIST oImageList BALLOON
regards, saludos

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

Balloon

Postby TimStone » Wed Aug 22, 2007 11:19 pm

Got it ... thanks ... all is now working well ! :D
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Postby Richard Chidiak » Thu Aug 23, 2007 8:38 am

Antonio

Is there a way of setting "BALLOON" as default tooltip style ?

Richard
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Postby Antonio Linares » Thu Aug 23, 2007 9:03 am

For the toolbars, you need to modify the class in this line:

::lTTBalloon := lTTBalloon // change this into .T.

For other tooltips, modify Class TWindow here:

hWnd = CreateToolTip( Self:hWnd, cToolTip ) // , .t. ) for ballon tooltips !
regards, saludos

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

Separator

Postby TimStone » Thu Aug 23, 2007 11:09 pm

Antonio ...
The sample has a vertical doted line ... how is that formed.

Also, you have a dark, full height, separator but the XP format is a shorter, lighter, line vertically centered. Is there a fix or setting to attain that capability.
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 69 guests