FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Defined Textcolor for VTitles ignored ?
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Defined Textcolor for VTitles ignored ?
Posted: Thu Aug 27, 2009 11:21 AM
Hello,

I wanted to change the Textcolor of Vtitles, but the Textcolor is ignored and always shown white.

From sample : Testtitl.prg :

Title 5 Horizontal( Down )

That works :
@ 20, 60 TITLETEXT OF oTitle5 TEXT "<== Move over me" COLOR CLR_BLACK

Text is shown in white :
@ 14, 220 TITLETEXT OF oTitle5 TEXT "FIVEWIN 9.07" COLOR CLR_BLACK FONT oFont2 3d






Best 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.
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 PM
Re: Defined Textcolor for VTitles ignored ?
Posted: Thu Aug 27, 2009 11:58 PM
Hello uwe...


When you use 3D clause to fill text with a color, should use a brush, not use COLOR sorry was my mistake in the ttitle sample

Code (fw): Select all Collapse
    @ 14,  220  TITLETEXT OF oTitle5 TEXT "FIVEWIN 9.07"  BRUSH oBrush3 FONT oFont2 3d
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: Defined Textcolor for VTitles ignored ?
Posted: Fri Aug 28, 2009 10:31 AM
Hello Daniel,

Thank You very much for the information.
I'm busy, to replace all my vertical Buttonbars with Vtitles.
It is far better, than my old used Solution and very easy.
I noticed < SHADOW > is ignored ?
A Shadow is painted, even it is not defined.
I added the < Gradient-Direction >



Code (fw): Select all Collapse
nSCR0 := GetSysMetrics(0)  // Screen-Width
nSCR17 := GetSysMetrics(17)  // Screen-Hight-Title-Height
    
//Title 4 Vertical ( Right )
// Top, Left - Width / Height 
@  0, nSCR0 - 80 TITLE oTitle4 size 80, nSCR17 of oWnd TOPRIGHT 
    
@ 10,10 TITLEIMG OF oTitle4 BITMAP ".\bitmaps\32X32\keys.bmp" SIZE 30,30 REFLEX TRANSPARENT ;
ACTION Msgalert( "Button 1")
@  80,25  TITLETEXT OF oTitle4 TEXT "Button 1" FONT oFont2 COLOR CLR_BLACK   
    
@ 100,20 TITLEIMG OF oTitle4 BITMAP ".\bitmaps\AlphaBmp\explorer.BMP" SIZE 30,30 REFLEX ANIMA
@ 170,25  TITLETEXT OF oTitle4 TEXT "Button 2" FONT oFont2 COLOR CLR_BLACK   
   
@ 190,15 TITLEIMG OF oTitle4 BITMAP ".\bitmaps\AlphaBmp\movie.BMP" SIZE 50,60 ANIMA LEVEL 100
@ 260,25  TITLETEXT OF oTitle4 TEXT "Button 3" FONT oFont2 COLOR CLR_BLACK   
   
@ 280,15 TITLEIMG OF oTitle4 BITMAP ".\bitmaps\AlphaBmp\movie.bmp" SIZE 50,60 ANIMA LEVEL 255
@ 350,25  TITLETEXT OF oTitle4 TEXT "Button 4" FONT oFont2 COLOR CLR_BLACK   
   
@ 370,20 TITLEIMG OF oTitle4 BITMAP ".\bitmaps\AlphaBmp\explorer.BMP" SIZE 30,30 REFLEX ANIMA
@ 440,25  TITLETEXT OF oTitle4 TEXT "Button 5" FONT oFont2 COLOR CLR_BLACK   
   
@ 460,20 TITLEIMG OF oTitle4 BITMAP ".\bitmaps\32X32\keys.bmp" SIZE 30,30 REFLEX TRANSPARENT 
@ 530,25  TITLETEXT OF oTitle4 TEXT "Button 6" FONT oFont2 COLOR CLR_BLACK   
    
@ 550,20 TITLEIMG OF oTitle4 BITMAP ".\bitmaps\AlphaBmp\explorer.BMP" SIZE 30,30 REFLEX ANIMA
@ 620,25  TITLETEXT OF oTitle4 TEXT "Button 7" FONT oFont2 COLOR CLR_BLACK   
   
oTitle4:lRound := .F.


Best 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.
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 PM
Re: Defined Textcolor for VTitles ignored ?
Posted: Fri Aug 28, 2009 10:53 AM
Hello Uwe...

Please add a new option at SHADOW clause: NONE (could be any word)
the line should be like:
Code (fw): Select all Collapse
[ SHADOW <shadow: TOPLEFT, TOPRIGHT, BOTTOMLEFT, BOTTOMRIGHT, NONE> ] ;


sample...

Code (fw): Select all Collapse
@ 480, 150  TITLE oTitle5 size 460, 100 of oWnd SHADOW NONE SHADOWSIZE 10

NONE option ignore all shadow option
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: Defined Textcolor for VTitles ignored ?
Posted: Fri Aug 28, 2009 11:56 AM
Hello Daniel,

it works perfect now.
With a second Vtitle, I can paint a Border ( like with my old Solution ).
The Screenshot shows the Reason, because using a vertical Gradient.
Creating vertical Buttonbars, it looks much better.
Maybe still Tooltips for the Buttons ( next FWH-Release ) ?

Border-Drawing with a second VTitle :


Vtitle-Border :
Code (fw): Select all Collapse
nSCR0 := GetSysMetrics(0)  // Screen-Width
nSCR17 := GetSysMetrics(17)  // Screen-Hight - Title-Height

//Title 4 Vertical ( Right )
// Top, Left - Width / Height 
@  0, nSCR0 - 80 TITLE oTitle4 size 80, nSCR17 of oWnd SHADOW NONE SHADOWSIZE 10 TOPRIGHT 
// Border
@  0, nSCR0 - 95 TITLE oTitle3 size 15, nSCR17 of oWnd SHADOW NONE SHADOWSIZE 10 TOPRIGHT 
...
...
oTitle4:lRound := .F.
oTitle4:aGrdBack = { { 0.5, 15851661, 16708826 },{ 0.5, 16708826, 15851661 } }
// Border
oTitle3:lRound := .F.
oTitle3:aGrdBack = { { 0.5, 15851661, 128 },{ 0.5, 128, 15851661 } }


I noticed with :
@ 0, nSCR0 - 80 TITLE oTitle4 size 80, nSCR17 of oWnd SHADOW NONE SHADOWSIZE 10 TOPRIGHT
The Function : GradientBrush( hDC, nTop, nLeft, nWidth, nHeight, aColors ) is not used.
To get a Vertical Gradient, I used :
@ 0, nSCR0 - 80 TITLE oTitle4 size 80, nSCR17 of oWnd SHADOW BOTTOMLEFT SHADOWSIZE 1 TOPRIGHT
to set : GradientFill( hDC, nTop, nLeft, nHeight, nWidth, aColors, .F. )



Best 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.
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 PM
Re: Defined Textcolor for VTitles ignored ?
Posted: Fri Aug 28, 2009 11:47 PM
Hello Uwe...

ukoenig wrote:Maybe still Tooltips for the Buttons ( next FWH-Release ) ?


Yes. i can do that, i hope finish it to next build
I working now a new class :-)
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: Defined Textcolor for VTitles ignored ?
Posted: Sun Aug 30, 2009 09:25 AM
Hello Daniel,

I added a Button BTNBMP to a Vtitle.
Without < 2007 > the Alpha-Channel is not displayed.
Is there a Reason for it ?

// replacement of Button 7
// -------------------------------
@ 550, 2 BTNBMP oBtn1 OF oTitle4 2007 ;
SIZE 75, 75 ;
FILENAME ".\bitmaps\32X32\keys.bmp" ;
ACTION MsgAlert( "Button-Click", "Button 1" ) ;
PROMPT "But.1" ;
FONT oButtFont ;
TOP
oBtn1:lTransparent := .t.
oBtn1:cTooltip := "Button1"
oBtn1:SetColor( 128 )

2007 used

Without 2007


Best 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.
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: Defined Textcolor for VTitles ignored ?
Posted: Wed Sep 02, 2009 02:08 PM
Hello Daniel,

is it possible, to get VTitles from Resources ( maybe in later FWH-Releases ) ?
For the moment, the only Solution is, using BMP's with included Text.



Best 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