tFolderEx transparent text FWH1202

tFolderEx transparent text FWH1202

Postby Rick Lipkin » Fri Mar 02, 2012 9:40 pm

To All

I have enclosed some code using the tFolderEx class with a Window and a embedded dialog with two simple folders.

I am using the new SetDlgGradient() function and all my text in not transparent. See the code and .rc's

Let me know if I am missing something.

Thanks
Rick Lipkin

Code: Select all  Expand view

// Custview
//
//

STATIC oWnd,oCUST
STATIC lOK
Static oFld

#INCLUDE "FIVEWIN.CH"


//-------------------------------
FUNC Main()

LOCAL SAYING
LOCAL cTITLE,lOK1


lOK   := .F.

SetDlgGradient( { { .50, nRGB( 201, 217, 237 ), nRGB( 231, 242, 255 ) } } )

SysReFresh()

cTITLE := "Customer Maintenance"

DEFINE WINDOW oWnd              ;
       FROM 0,0 to 32,100       ;
       TITLE cTITLE


DEFINE DIALOG oCust RESOURCE "CUSTOMER" of oWnd

       REDEFINE FOLDEREX oFld ID 109 of oCust PROMPT "Billing Information", "Service Address";
                DIALOGS "CUSTVIEW", "SERVVIEW"


ACTIVATE DIALOG oCust  NOWAIT ;
   ON INIT ( oCust:Move( 0, 0 ));
   VALID(!GETKEYSTATE( 27 ))


ACTIVATE WINDOW oWnd ;
   ON INIT oWnd:SetSize( oCust:nWidth, oCust:nHeight, .T. );
   VALID ( IIF( !lOK, ExitPgm(.T.,oWnd ), .F. ))


RETURN( NIL )


//-------------------------------
Static FUNCTION ExitPgm( lCLEAN,oWnd1 )

LOCAL cDEFA, lOK1

IF lCLEAN = .T.
   lOK  := .T.
   lOK1 := lOK

   oWnd1:End()

ENDIF

RETURN( lOK1 )

// end

 


.rc files

Customer.rc
Code: Select all  Expand view

CUSTOMER DIALOG 3, 13, 248, 169
STYLE WS_CHILD
FONT 8, "Arial"
{
 CONTROL "", 109, "TFolderex", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 3, 4, 229, 141
}
 


Custview.rc
Code: Select all  Expand view

CUSTVIEW DIALOG 12, 11, 238, 117
STYLE WS_CHILD
FONT 6, "MS Sans Serif"
{
 CTEXT "Customer Id", -1, 5, 35, 94, 10, SS_CENTER | SS_NOPREFIX | WS_GROUP
 EDITTEXT 110, 5, 47, 94, 12, ES_AUTOHSCROLL | NOT WS_TABSTOP | WS_BORDER
 CHECKBOX "", 118, 77, 68, 8, 8, BS_AUTOCHECKBOX | WS_TABSTOP
 CONTROL "  Individual", 116, "BUTTON", BS_AUTORADIOBUTTON, 44, 6, 60, 12
 CONTROL "  Commercial", 117, "BUTTON", BS_AUTORADIOBUTTON, 44, 19, 60, 12
 LTEXT "Customer Type", -1, 7, 8, 33, 22, SS_NOPREFIX | WS_GROUP
 CONTROL "  COD", 129, "BUTTON", BS_AUTORADIOBUTTON, 128, 27, 60, 12
 CONTROL "  Net", 131, "BUTTON", BS_AUTORADIOBUTTON, 128, 40, 60, 12
 LTEXT "Tax Exempt", -1, 8, 66, 65, 11, SS_NOPREFIX | WS_GROUP
 GROUPBOX "Terms", 197, 124, 15, 71, 48, BS_GROUPBOX
}
 


Servview.rc
Code: Select all  Expand view

SERVVIEW DIALOG 12, 11, 238, 117
STYLE WS_CHILD
FONT 6, "MS Sans Serif"
{
 LTEXT "Company or Last Name", -1, 24, 58, 105, 10, SS_NOPREFIX | WS_GROUP
 EDITTEXT 120, 24, 70, 105, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
}
 


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

Re: tFolderEx transparent text FWH1202

Postby ukoenig » Fri Mar 02, 2012 10:38 pm

Rick,

You have to define the missing Pages to show transparent Controls.
using SetDlgGradient( { { .50, nRGB( 201, 217, 237 ), nRGB( 231, 242, 255 ) } } )
all Folderpages will have the same Bakground.

Image

I will use Your Sample to show the Logic using different Brushes for each Page.

Best Regards
Uwe :lol:
Last edited by ukoenig on Sat Mar 03, 2012 1:21 pm, edited 2 times in total.
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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: tFolderEx transparent text FWH1202

Postby ukoenig » Sat Mar 03, 2012 12:02 am

Rick,

the first result on a quick test.
I will place a Download-link as soon it is finished,
because there are to many needed changes to Your Code and Resources, to get it working.

Supported :
Transparent Groups, Radios, Checkboxes
Backgrounds : Color, Gradient, Brush and Image
I will add 2 more Folder-pages for the brush and Image-test.
Each Page shows a different Background.

You need a valid Text-ID to define the Color and Font like Sample :
REDEFINE SAY oSay PROMPT "Customer ID" ID 10 OF oFld:aDialogs[1] UPDATE
oSay:SetColor( nDTcolor, nDTcolor )
oSay:SetFont( oFont )


4 different Brushes
Image

Best 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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: tFolderEx transparent text FWH1202

Postby Rick Lipkin » Sat Mar 03, 2012 2:09 pm

Uwe

Thank you for a LOT of work!

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

Re: tFolderEx transparent text FWH1202

Postby ukoenig » Sat Mar 03, 2012 2:19 pm

Rick,

the Download-link of complete Source ( 2.3 MB )

c_path := GETCURDIR()
must be changed, using older FWH-versions to load Images
c_path := CURDRIVE() + ":\" + GETCURDIR()

http://www.pflegeplus.com/fw_downloads/rick2.zip

Best 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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: tFolderEx transparent text FWH1202

Postby ukoenig » Sat Mar 03, 2012 9:53 pm

Rick,

Download updated.
Added Dialog-brush ( Color, Gradient, BMP-brush or Image )

Image

Best 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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: tFolderEx transparent text FWH1202

Postby Rick Lipkin » Sat Mar 03, 2012 11:21 pm

Uwe

Just wanted to thank you Very much for your help. I have been working with your code most of the day and am very close in achieving the folder transparency and font on the Says.

I will let you know more tomorrow or monday on your latest updates.

Many Thanks!
Rick Lipkin
User avatar
Rick Lipkin
 
Posts: 2665
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 76 guests