Folders appearance

Folders appearance

Postby TimStone » Tue Jan 07, 2014 11:40 pm

I asked about this a long time ago, but never got a response. I'll try again:

I have an application using folders with dialogs. Its all 100% functional and there is absolutely no problem, except for the tabs.

The screens use a nice brush, the xbrowse uses gradient headers ... its all very nice. Except, the tabs don't look good.

While everything else has a nice brush or gradients, the tabs are set by default to the Button Face default ( which is used nowhere ). Also, the tabs are squared off, and don't look that nice.

I would like to have the tops of the tabs rounded, and I would like to have the colors of the tabs match the rest of the dialog ( button bars, menus, header on browse, etc ).

I tried substituting the FOLDEREX option, but it had two immediate problems. First, it dropped the background color of the dialogs ( BRUSH ), and secondly, clicking on the tabs did not do anything. The tabs looked nice, however. I tried following the samples, made some changes, and suddenly it wouldn't build !

So, is there a way to improve the appearance of the tFolder class so the tabs will look better.

Thanks for all of your ideas.

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

Re: Folders appearance

Postby cnavarro » Wed Jan 08, 2014 12:23 am

Tim
You can add a picture or an example of your problem?
I used the TFolderEx class and I have not found the problem you mention
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: 6500
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Folders appearance

Postby TimStone » Wed Jan 08, 2014 12:27 am

UPDATED: My comment below refers to using the testflx8.rc as a model. Using testflx3.rc does work with Pelles C.

I'm trying to use tFOLDEREX, but it will not compile with Pelles C / xHarbour ( .com ).

On the main dialog, when trying to add the FOLDEREX control, the error is "Number expected".
I've actually copied it directly from the sample and simply adjusted the ID number and location settings in the RC

Then on every dialog that displays on the tabs, it says BEGIN expected.

When building with Harbour / MSVC I have no errors, and it works.

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

Re: Folders appearance

Postby Antonio Linares » Wed Jan 08, 2014 1:02 am

Tim,

Is is a resources compiler error ?

Could you copy here the RC section ? thanks
regards, saludos

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

Re: Folders appearance

Postby TimStone » Wed Jan 08, 2014 2:49 am

I solved it by reverting to DIALOG instead of the DIALOGEX model. Look at yor sample 3 rc file (works) and at your sample 8 .rc ( doesn't build). It is resolved so we can dismiss this. EXCEPT

is there a means to add a gradient to the tabs like I can do with browse headers?


Sent from my iPad using Tapatalk HD
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: 2904
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Folders appearance

Postby Antonio Linares » Wed Jan 08, 2014 7:44 am

TFolderEx objects have a DATA bClrTab. If defined (a codeblock) it has to return a hBrush that it used to paint the tabs.

That hBrush can be the brush of gradient brush.

You can create it this way:

DEFINE BRUSH oBrush GRADIENT aGrad

oFolderEx:bClrTab = { || oBrush:hBrush }
regards, saludos

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

Re: Folders appearance

Postby TimStone » Wed Jan 08, 2014 6:07 pm

Antonio,

I tried that, but it did two things:

1) It simply picked up the brush used on the main screens rather than creating a gradient
2) It eliminated the color bar across the top of the tab that showed which one was in focus, and which ones the mouse was pointing to.

All I really wanted to do was to change the background color of the tab to be consistent with the headers of the xbrowse controls and the color of the button bar without losing the mouse point and in focus highlights.

Unfortunately there are no documents for FOLDEREX and the samples don't show the options well, especially with REDEFINE useage.

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

Re: Folders appearance

Postby Rick Lipkin » Wed Jan 08, 2014 6:26 pm

Tim

This code may help .. one of our friends in the forum made this suggestion to me on how to color the tabs .. what I was trying to do was to 'grey out' the tabs I disabled to make it much more clear to the user.

Hope this helps.

Rick Lipkin
Code: Select all  Expand view

aColorDis := { { 1, nRGB( 190, 190, 190), nRGB( 211, 211, 211 ) } }

oFld:DisableTab( 2 )
oFld:aGradDis := aColorDis

oFld:DisableTab( 3 )
oFld:aGradDis := aColorDis

oFld:DisableTab( 4 )
oFld:aGradDis := aColorDis
 

Image
User avatar
Rick Lipkin
 
Posts: 2628
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: Folders appearance

Postby TimStone » Wed Jan 08, 2014 9:44 pm

SOLUTION:

Here is the simple solution to the tab controls question ( matching the gradient ).

After creating the FOLDEREX, add the following lines:
oFld:aGradUnSel := { { 0.50,16776960,16777215 }, { 0.50,16777215,16776960 } }
oFld:aGradOverUnSel := { { 0.25, nRGB( 100, 149, 237 ), nRGB( 100, 149, 237 ) }, { 0.75, 16777215,16776960 } }

You can also set the values for the selected, mouse over selected, etc. if you want. This overrides the defaults.

Its nice because it keeps my screens consistent in appearance across buttonbars, xbrowse, and now tabs.

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

Re: Folders appearance

Postby Antonio Linares » Wed Jan 08, 2014 10:16 pm

Tim,

Very good, thanks for sharing it :-)
regards, saludos

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


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 18 guests