FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour How to make TFOLDEREX in FLAT style?
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
How to make TFOLDEREX in FLAT style?
Posted: Fri Sep 22, 2023 09:19 AM

Dear All,

I need to change TFOLDEREX UI as FLAT style. How can I do it?

Thanks in advance,

Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: How to make TFOLDEREX in FLAT style?
Posted: Fri Sep 22, 2023 01:46 PM

Dear Dutch,

Please provide a screenshot with the folderex look that you wish

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
Re: How to make TFOLDEREX in FLAT style?
Posted: Sat Sep 23, 2023 04:32 AM
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
Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: How to make TFOLDEREX in FLAT style?
Posted: Sun Sep 24, 2023 08:02 PM

Dear Dutch,

We need to modify METHOD PaintTB() so tabs are painted in different styles. Looking for a way to do it

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: How to make TFOLDEREX in FLAT style?
Posted: Sun Sep 24, 2023 09:24 PM
hi Dutch

have you try to disable "visual Style" for TFOLDEREX :?:
greeting,

Jimmy
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: How to make TFOLDEREX in FLAT style?
Posted: Mon Sep 25, 2023 05:34 AM

Dear Jimmy,

How to do it ? thank you

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: How to make TFOLDEREX in FLAT style?
Posted: Mon Sep 25, 2023 12:55 PM
hi,
Code (fw): Select all Collapse
   oTab := TFolderEx() :New( .. )
   // disable visual Style
   SetWindowTheme( oTab:hWnd, "", "" )
greeting,

Jimmy
Posts: 1816
Joined: Wed Oct 26, 2005 02:49 PM
Re: How to make TFOLDEREX in FLAT style?
Posted: Mon Sep 25, 2023 10:13 PM
Creo que tambien te puede funcionar
Code (fw): Select all Collapse
@ 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
Saludos
LEANDRO AREVALO
Bogotá (Colombia)
https://hymlyma.com
https://hymplus.com/
leandroalfonso111@gmail.com
leandroalfonso111@hotmail.com

[ Turbo Incremental Link64 6.98 Embarcadero 7.70 ] [ FiveWin 25.01 ] [ xHarbour 64 bits) ]
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
Re: How to make TFOLDEREX in FLAT style?
Posted: Tue Sep 26, 2023 01:33 AM
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
Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: How to make TFOLDEREX in FLAT style?
Posted: Tue Sep 26, 2023 06:14 AM
Dear Dutch,

Please try Leandro's solution as it seems a very good one:

https://fivetechsupport.com/forums/viewtopic.php?p=263934&sid=1638a370ada5b0acba8110c25770d52a#p263934
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: How to make TFOLDEREX in FLAT style?
Posted: Tue Sep 26, 2023 06:49 AM
hi Dutch,
dutch wrote:Can I DISABLE TAB (disable color) for TFOLDER?
in CLASS TFolderEx() there is
Code (fw): Select all Collapse
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 (fw): Select all Collapse
   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
greeting,

Jimmy
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: How to make TFOLDEREX in FLAT style?
Posted: Tue Sep 26, 2023 11:44 AM
Mr. Dutch

While thanking Mr. Leandro,
Please try this small sample
Code (fw): Select all Collapse
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
Regards



G. N. Rao.

Hyderabad, India

Continue the discussion