FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Request: Differences in styles
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Request: Differences in styles
Posted: Mon Mar 07, 2016 05:30 PM

We now have a multitude of styles for controls. 2007, 2010, 2013, 2015

Could someone review how they are different ? Thank you.

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: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Request: Differences in styles
Posted: Tue Mar 08, 2016 10:42 AM
The objective is to create homogeneous styles for all controls
I added in style menus 2013 (like VS2013 and allows be modified by users) and 2015, as well as styles 2007 and 2010 already existed
These styles have been added to TBar, TReBar, etc. and gradually will be added to other controls.

Style 2013 Menu


Style 2013 TBar


Style 2015 Menu


Style 2015 TBar


Style 2010 Menu


Style 2010 TBar
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noci贸n del tiempo

El secreto de la felicidad no est谩 en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Request: Differences in styles
Posted: Tue Mar 08, 2016 10:50 AM
Well, if your application defines a data or a static variable that defines the style of your application, you can define the style of the menus and TBar as follows
In this example, my data defined is ::nStyle

Menu:
Code (fw): Select all Collapse
聽 聽MENU ::oMenu FONT ::oFontX NOBORDER //ROUND 6 //HEIGHT 2
聽 聽 聽 ::oMenu:l2007 聽 聽:= ( ::nStyle == 2007 )
聽 聽 聽 ::oMenu:l2010 聽 聽:= ( ::nStyle == 2010 )
聽 聽 聽 ::oMenu:l2013 聽 聽:= ( ::nStyle == 2013 )
聽 聽 聽 ::oMenu:l2015 聽 聽:= ( ::nStyle == 2015 )
聽 聽 聽 ::oMenu:SetColors()
聽 聽 聽 if ::oMenu:l2013          //Only, style 2013 can be modified 
聽 聽 聽 ::oMenu:nClrText := ::nColorBarI
聽 聽 聽 endif


TBar:
Code (fw): Select all Collapse
聽 聽DEFINE BUTTONBAR ::oBar SIZE nSize, nSize OF ::oWnd
聽 聽::oBar:SetFont( ::oFontCtrls )
聽 聽::oBar:bRClicked := { | o | .T. }
聽 聽::oBar:l2007 聽 聽 := ( ::nStyle == 2007 )
聽 聽::oBar:l2010 聽 聽 := ( ::nStyle == 2010 )
聽 聽::oBar:l2013 聽 聽 := ( ::nStyle == 2013 )
聽 聽::oBar:l2015 聽 聽 := ( ::nStyle == 2015 )
聽 聽::oBar:SetGradients()
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noci贸n del tiempo

El secreto de la felicidad no est谩 en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Re: Request: Differences in styles
Posted: Tue Mar 08, 2016 06:14 PM

Thank you. I have no problem specifying them but I was looking for the display differences you showed in the images.

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: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Request: Differences in styles
Posted: Tue Mar 08, 2016 06:33 PM
TimStone wrote:Thank you. I have no problem specifying them but I was looking for the display differences you showed in the images.

Tim


Tim,

Examples are to show what functions are defined styles colors.
In the menus, SetColors() function, which defines the colors and calls the function SetSkin ... ()
In controls will SetGradients()

Regards
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noci贸n del tiempo

El secreto de la felicidad no est谩 en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Re: Request: Differences in styles
Posted: Tue Mar 08, 2016 06:48 PM

When I use 2013 or 2015 I get a grey background for the bar. ( Windows 10 ).
I tried using the BRUSH command but it doesn't do anything
I noticed your sample has SetGradients(). That didn't do anything so I assume it must be defined elsewhere.

So ... how do we add color to the background. I did check the Wiki but nothing there provides an explanation.

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
Re: Request: Differences in styles
Posted: Tue Mar 08, 2016 07:50 PM

I can't get anything but grey for a background with any style except 2007.

When I looked at the current class versus the current FiveWin.ch file, it would appear the include file does not match the class ( for commands ). Maybe this is part of the problem.

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: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Request: Differences in styles
Posted: Tue Mar 08, 2016 08:58 PM
TimStone wrote:I can't get anything but grey for a background with any style except 2007.

When I looked at the current class versus the current FiveWin.ch file, it would appear the include file does not match the class ( for commands ). Maybe this is part of the problem.

Tim


Styles and colors in controls still must be reviewed
Method SetGradients() is in TBar.prg


Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noci贸n del tiempo

El secreto de la felicidad no est谩 en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Re: Request: Differences in styles
Posted: Wed Mar 09, 2016 04:34 PM

I reviewed the class closely, and Set Gradients was not working ( it cannot be over written with better values externally ).

Instead, after using a COMMAND to create the button bar, I added: oBar:bClrGrad := aPubGrad where aPubGrad is defined in the MAIN module with gradient values that I also use for the header of my xbrowse displays.

That works.

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

Continue the discussion