FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Theme support for tToolbar
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Theme support for tToolbar
Posted: Tue Aug 21, 2007 06: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
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Theme support for tToolbar
Posted: Tue Aug 21, 2007 06: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
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Toolbar
Posted: 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
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
TOOLBAR theme not working !
Posted: Wed Aug 22, 2007 04: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
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Theme support for tToolbar
Posted: Wed Aug 22, 2007 04: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

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Class
Posted: Wed Aug 22, 2007 07: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
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Theme support for tToolbar
Posted: Wed Aug 22, 2007 07: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
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Rebars
Posted: Wed Aug 22, 2007 08: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
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Theme support for tToolbar
Posted: Wed Aug 22, 2007 08: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
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Small height toolbar ?
Posted: Wed Aug 22, 2007 08: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
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Theme support for tToolbar
Posted: 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
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Balloon
Posted: 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
Posts: 946
Joined: Thu Oct 06, 2005 07:05 PM
Theme support for tToolbar
Posted: Thu Aug 23, 2007 08: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
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Theme support for tToolbar
Posted: Thu Aug 23, 2007 09: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
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Separator
Posted: 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