Defined Textcolor for VTitles ignored ?

Defined Textcolor for VTitles ignored ?

Postby ukoenig » 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

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: Defined Textcolor for VTitles ignored ?

Postby Daniel Garcia-Gil » 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: Select all  Expand view
   @ 14,  220  TITLETEXT OF oTitle5 TEXT "FIVEWIN 9.07"  BRUSH oBrush3 FONT oFont2 3d
User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita

Re: Defined Textcolor for VTitles ignored ?

Postby ukoenig » 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 >

Image

Code: Select all  Expand view

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 :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: Defined Textcolor for VTitles ignored ?

Postby Daniel Garcia-Gil » 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: Select all  Expand view
[ SHADOW <shadow: TOPLEFT, TOPRIGHT, BOTTOMLEFT, BOTTOMRIGHT, NONE> ] ;


sample...

Code: Select all  Expand view
@ 480, 150  TITLE oTitle5 size 460, 100 of oWnd SHADOW NONE SHADOWSIZE 10

NONE option ignore all shadow option
User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita

Re: Defined Textcolor for VTitles ignored ?

Postby ukoenig » 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 :
Image

Vtitle-Border :
Code: Select all  Expand view

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. )

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: Defined Textcolor for VTitles ignored ?

Postby Daniel Garcia-Gil » 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 :lol:
User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita

Re: Defined Textcolor for VTitles ignored ?

Postby ukoenig » Sun Aug 30, 2009 9: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
Image
Without 2007
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: Defined Textcolor for VTitles ignored ?

Postby ukoenig » Wed Sep 02, 2009 2: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.

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


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Carles and 47 guests