FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour SetColor and TFolder?
Posts: 1387
Joined: Fri May 23, 2008 01:33 PM
SetColor and TFolder?
Posted: Sat Nov 29, 2008 02:12 PM
Hi,

Is it possible to use set color TFolder class.

#include "FiveWin.ch" 

function Main() 

   local oFnt, oFnt2, oDlg, oFld, oGrp, oGrp1 
    
   DEFINE FONT oFnt NAME "Verdana" SIZE 0, -16 BOLD 

   DEFINE FONT oFnt2 NAME "Arial" SIZE 0, -10 
    
   DEFINE DIALOG oDlg SIZE 400, 300 FONT oFnt TRANSPARENT
   
   @ 0.5, 1 FOLDER oFld OF oDlg SIZE 188, 138 ; 
      PROMPTS "One", "Two", "Three" 
      
   @ 1, 1 GROUP oGrp TO 5, 15 PROMPT "Test" OF oFld:aDialogs[ 1 ] FONT oFnt2 

   @ 5, 1 BUTTON "font" OF oFld:aDialogs[ 1 ] ACTION oGrp:SelFont() 
      
   ACTIVATE DIALOG oDlg CENTERED ON INIT (oDlg:SetColor(,9425383),oFld:SetColor(,9425383))

return nil
Regards,



Hakan ONEMLI



Harbour & MSVC 2022 & FWH 23.06
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Folder-Color
Posted: Sat Nov 29, 2008 02:39 PM
Hello Horizon,

make it a bit different :

Sample : fill a DIALOG and FOLDER with GRADIENT
DEFINE DIALOG oDlg RESOURCE "MainDlg" TITLE  "Dialog" FONT ProgFont

REDEFINE FOLDER oFld ID 110 OF oDlg ; 
PROMPTS "  &Page 1 ", "  &Page 2 "  ;
DIALOGS "Page1","Page2" FONT oProgFont 

FOLDER_1(oDlg,oFld)
FOLDER_2(oDlg,oFld)

ACTIVATE DIALOG oDlg CENTERED ;
ON PAINT ( Gradpaint0( hDC, oDlg ), SetDialogsGradient( oFld ) ) ;
ON INIT ( oDlg:Move( 30 , 10, oDlg:nWidth, oDlg:nHeight, .f. ) 

RETURN ( NIL )

// --------- Gradient in FOLDER -------------------

FUNCTION SetDialogsGradient( oFld ) 
LOCAL n, oDlg 
    
for n = 1 to Len( oFld:aDialogs ) 
      oDlg = oFld:aDialogs[ n ]                                      
      oDlg:bPainted = { | hDC | GradientFill( hDC, 0, 0, oDlg:nHeight, oDlg:nWidth, { { 0.50, 12609872, 16045947 } } ) } 
next    

RETURN NIL    

// -------- Gradient in DIALOG ---------------------------------

static func Gradpaint0( hDC, oDlg )
local aGrad1

aGrad1 := { { 0.50, 16054371, 8388608 },{ 0.50, 8388608, 16054371 } }
GradientFill( hDC, 0, 0, oDlg:nHeight, oDlg:nWidth, aGrad1, .T. )

RETURN NIL
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 1387
Joined: Fri May 23, 2008 01:33 PM
SetColor and TFolder?
Posted: Sat Nov 29, 2008 09:45 PM
Thank you Uwe,

Your code works perfectly, but I use WindowsXP.Manifest. In this case transparent does not work.

I have searched the forum. I found the below thread from Ramesh. I have changed the TFolder class like Ramesh changed in TControl class. It work perfectly.

Thank you Ramesh,


http://forums.fivetechsoft.com/viewtopic.php?t=4807
Regards,



Hakan ONEMLI



Harbour & MSVC 2022 & FWH 23.06
Posts: 1387
Joined: Fri May 23, 2008 01:33 PM
SetColor and TFolder?
Posted: Sat Nov 29, 2008 09:49 PM

Hi,

Just one question. Is it possible to change color of Tabs Caption?

Regards,



Hakan ONEMLI



Harbour & MSVC 2022 & FWH 23.06
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Tab-colors
Posted: Sat Nov 29, 2008 10:14 PM

Hello Hakan,
have a look at :

http://forums.fivetechsoft.com/viewtopi ... lored+tabs

Regards
Uwe :lol:

Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 2064
Joined: Fri Jan 06, 2006 09:28 PM
SetColor and TFolder?
Posted: Sun Nov 30, 2008 03:17 AM

Nose si es esto lo que quieres....saludos... :shock:
*oFldArti:aDialogs[2]:SetColor( ,rgb(255, 255, 200)) // PONER COLOR A UNA PESTAÑA DE FOLDER

Dios no está muerto...



Gracias a mi Dios ante todo!
Posts: 654
Joined: Fri Oct 21, 2005 05:54 AM
SetColor and TFolder?
Posted: Sun Nov 30, 2008 03:58 AM

Hello Horizon,

You are most welcome and thanks for your kind words.

  • Ramesh Babu P
Posts: 598
Joined: Tue Apr 15, 2008 04:51 PM
SetColor and TFolder?
Posted: Sun Nov 30, 2008 08:15 PM

How would you set colors in tabs not folders?

Thank you

Harvey
Posts: 1387
Joined: Fri May 23, 2008 01:33 PM
SetColor and TFolder?
Posted: Mon Dec 01, 2008 01:14 PM
hag wrote:How would you set colors in tabs not folders?


I could not. Is there anybody who changed the tabs color?

Thanks,
Regards,



Hakan ONEMLI



Harbour & MSVC 2022 & FWH 23.06
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Tab-colors
Posted: Mon Dec 01, 2008 04:18 PM
Hallo Horizon,

It is just a test, because i don't need it.
I think with some changes in Tfolder it seems,
it is possible to define extra colors for the tabs.
You need two color-eareas : one for tabs and another one for data.
It is not completed for the moment ( missing transparent for tab-background-area )
There has still a activate-color needed like in this sample, the
2. tab-color ( green ) has change to white after the 2. Page has the focus.
Maybe another idea from somebody else ?



Regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.

Continue the discussion