Request: Differences in styles

Request: Differences in styles

Postby TimStone » Mon Mar 07, 2016 5: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
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Request: Differences in styles

Postby cnavarro » 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
Image

Style 2013 TBar
Image

Style 2015 Menu
Image

Style 2015 TBar
Image

Style 2010 Menu
Image

Style 2010 TBar
Image
Last edited by cnavarro on Tue Mar 08, 2016 11:03 am, edited 2 times in total.
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
User avatar
cnavarro
 
Posts: 6541
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Request: Differences in styles

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


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


   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
User avatar
cnavarro
 
Posts: 6541
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Request: Differences in styles

Postby TimStone » Tue Mar 08, 2016 6: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
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Request: Differences in styles

Postby cnavarro » Tue Mar 08, 2016 6: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
User avatar
cnavarro
 
Posts: 6541
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Request: Differences in styles

Postby TimStone » Tue Mar 08, 2016 6: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
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Request: Differences in styles

Postby TimStone » Tue Mar 08, 2016 7: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
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Request: Differences in styles

Postby cnavarro » Tue Mar 08, 2016 8: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


Image
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
User avatar
cnavarro
 
Posts: 6541
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Request: Differences in styles

Postby TimStone » Wed Mar 09, 2016 4: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
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 55 guests