Theme support for tToolbar

User avatar
TimStone
Posts: 2536
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA
Contact:

Theme support for tToolbar

Post by TimStone »

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
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

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
TimStone
Posts: 2536
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA
Contact:

Toolbar

Post by TimStone »

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
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
User avatar
TimStone
Posts: 2536
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA
Contact:

TOOLBAR theme not working !

Post by TimStone »

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
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post by James Bott »

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
TimStone
Posts: 2536
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA
Contact:

Class

Post by TimStone »

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
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

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
TimStone
Posts: 2536
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA
Contact:

Rebars

Post by TimStone »

So toolbars doesn't work properly...

Tim
Tim Stone
http://www.MasterLinkSoftware.com
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

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
TimStone
Posts: 2536
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA
Contact:

Small height toolbar ?

Post by TimStone »

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
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

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
TimStone
Posts: 2536
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA
Contact:

Balloon

Post by TimStone »

Got it ... thanks ... all is now working well ! :D
Tim Stone
http://www.MasterLinkSoftware.com
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
User avatar
Richard Chidiak
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France
Contact:

Post by Richard Chidiak »

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
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

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
TimStone
Posts: 2536
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA
Contact:

Separator

Post by TimStone »

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
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
Post Reply