Page 1 of 1
How to make TFOLDEREX in FLAT style?
Posted: Fri Sep 22, 2023 9:19 am
by dutch
Dear All,
I need to change TFOLDEREX UI as FLAT style. How can I do it?
Thanks in advance,
Re: How to make TFOLDEREX in FLAT style?
Posted: Fri Sep 22, 2023 1:46 pm
by Antonio Linares
Dear Dutch,
Please provide a screenshot with the folderex look that you wish
Re: How to make TFOLDEREX in FLAT style?
Posted: Sat Sep 23, 2023 4:32 am
by dutch
Dear Antonio,
I use FOLDER for many years but the disable folder tab and enable is the same. I test TFOLDEREX is show different (that I need).
I just need TFOLDER that show disable tab as disable object as TFOLDEREX.
Antonio Linares wrote:Dear Dutch,
Please provide a screenshot with the folderex look that you wish
Re: How to make TFOLDEREX in FLAT style?
Posted: Sun Sep 24, 2023 8:02 pm
by Antonio Linares
Dear Dutch,
We need to modify METHOD PaintTB() so tabs are painted in different styles. Looking for a way to do it
Re: How to make TFOLDEREX in FLAT style?
Posted: Sun Sep 24, 2023 9:24 pm
by Jimmy
hi Dutch
have you try to disable "visual Style" for TFOLDEREX

Re: How to make TFOLDEREX in FLAT style?
Posted: Mon Sep 25, 2023 5:34 am
by Antonio Linares
Dear Jimmy,
How to do it ? thank you
Re: How to make TFOLDEREX in FLAT style?
Posted: Mon Sep 25, 2023 12:55 pm
by Jimmy
hi,
Code: Select all | Expand
oTab := TFolderEx() :New( .. )
// disable visual Style
SetWindowTheme( oTab:hWnd, "", "" )
Re: How to make TFOLDEREX in FLAT style?
Posted: Mon Sep 25, 2023 10:13 pm
by leandro
Creo que tambien te puede funcionar
Code: Select all | Expand
@ 0, 0 FOLDEREX oFld1 PIXEL PROMPTS "Pendientes", "Despachados" OF oP SIZE oP:nWidth, oP:nHeight TAB HEIGHT 40 ON CHANGE EVAL(cbRecibe) NOBORDER
WITH OBJECT oFld1
:aGradSel := { { 1, CLR_WHITE, CLR_WHITE } }
:aGradUnSel := { { 1, CLR_WHITE, CLR_WHITE } }
:aGradOver := { { 1, Rgb( 237, 237, 237 ), Rgb( 237, 237, 237 ) } } //
:aGradOverUnSel := :aGradOver
END
Re: How to make TFOLDEREX in FLAT style?
Posted: Tue Sep 26, 2023 1:33 am
by dutch
Dear Antonio,
Can I DISABLE TAB (disable color) for TFOLDER?
Antonio Linares wrote:Dear Dutch,
We need to modify METHOD PaintTB() so tabs are painted in different styles. Looking for a way to do it
Re: How to make TFOLDEREX in FLAT style?
Posted: Tue Sep 26, 2023 6:14 am
by Antonio Linares
Dear Dutch,
Please try Leandro's solution as it seems a very good one:
https://fivetechsupport.com/forums/view ... 2a#p263934
Re: How to make TFOLDEREX in FLAT style?
Posted: Tue Sep 26, 2023 6:49 am
by Jimmy
hi Dutch,
dutch wrote:Can I DISABLE TAB (disable color) for TFOLDER?
in CLASS TFolderEx() there is
Code: Select all | Expand
METHOD DisableTab( nOption ) CLASS TFolderEx
DEFAULT nOption := ::nOption
IF ::aEnable[ nOption ]
::aEnable[ nOption ] = .F.
::aDialogs[ nOption ]:Disable()
::Refresh()
ENDIF
RETURN NIL
---
Method to set Color of TAB are in Codeblock
Code: Select all | Expand
bClrTabs := {| o, n | ::SetFldColors( o, n ) },;
METHOD SetFldColors( oThis, n ) CLASS TFolderEx
...
IF ! ::aEnable[ n ]
hBrush = GradientBrush( ::hDC, 0, 0, nWidth, nHeight, ::aGradDis, lHor )
RETURN hBrush
ENDIF
Re: How to make TFOLDEREX in FLAT style?
Posted: Tue Sep 26, 2023 11:44 am
by nageswaragunupudi
Mr. Dutch
While thanking Mr. Leandro,
Please try this small sample
Code: Select all | Expand
function TestFolderex()
local oDlg, oFld
DEFINE DIALOG oDlg SIZE 400,300 PIXEL TRUEPIXEL ;
TITLE "FOLDEREX FLAT STYLE by Leandro"
@ 10,10 FOLDEREX oFld ADJUST OF oDlg SIZE 380,280 PIXEL ;
PROMPT "Monday", "Tuesday", "WednesDay", "Thursday"
WITH OBJECT oFld
:aGradSel := { { 1, CLR_WHITE, CLR_WHITE } }
:aGradUnSel := { { 1, CLR_WHITE, CLR_WHITE } }
:aGradOver := { { 1, Rgb( 237, 237, 237 ), Rgb( 237, 237, 237 ) } } //
:aGradOverUnSel := :aGradOver
//
:DisableTab( 3 )
END
ACTIVATE DIALOG oDlg CENTERED
return nil
