Button Bar Transparency with FWH 1612

Button Bar Transparency with FWH 1612

Postby Rick Lipkin » Fri Jan 13, 2017 2:31 pm

To All

Just installed FWH 1612 and noticed the transparency's of my button bar is not working as it did with FWH 1504. Any Ideas ?

Rick Lipkin

Here is the code :
Code: Select all  Expand view

DEFINE BUTTONBAR oBar OF oWind SIZE 80,58 2010    // 80,58   80,64
       oBar:SetColor(0)
                           
       oBar:bClrGrad = { || { { 0.10,15724527,7303023 }, ;
                       { 0.10,7303023,15724527 } } }

      DEFINE BUTTON oButt1 of oBar ACTION ( _VehBrow( oWind )) ;
              RESOURCE "Car",;
                       "Car",;
                       "Car";
              PROMPT "Veh\Eq\Boat" ;
              TOOLTIP "Vehicles and Equipment Information"
       oButt1:lTransparent = .T.

       DEFINE BUTTON oButt2 of oBar ACTION ( _Tripmenu( oWIND,dExe,oMenu ));
              RESOURCE "Trips",;
                       "Trips",;
                       "Trips";
              PROMPT "Trip\Resrv\Disp" ;
              TOOLTIP "Trips, Reservations and Dispatch Information"
       oButt2:lTransparent = .T.


       DEFINE BUTTON oButt3 of oBar ACTION ( _Gasmenu( oWIND,dExe,oMenu ));
              RESOURCE "Gaspump",;
                       "Gaspump",;
                       "Gaspump";
              PROMPT "Gas\Cvrp" ;
              TOOLTIP "Gas - Gas Import and CVRP Information"
       oButt3:lTransparent = .T.

       DEFINE BUTTON oButt4 of oBar ACTION ( _Mantmenu( oWIND,oMenu,dExe ));
              RESOURCE "tools",;
                       "tools",;
                       "tools";
              PROMPT "WorkOrd\Maint" ;
              TOOLTIP "Work Orders and Maintenance Tables"

       oButt3:lTransparent = .T.

       DEFINE BUTTON oButt5 of oBar ACTION (_RPTmenu( oWIND, dEXE,oMenu )) ;
              RESOURCE "report",;
                       "report",;
                       "report";
              PROMPT "Reports" ;
              TOOLTIP "Reports Menu"

       DEFINE BUTTON oButt6 of oBar ACTION ( _UTILmenu( oWIND ));
              RESOURCE "controlpanel",;
                       "controlpanel",;
                       "controlpanel";
              PROMPT "Control Panel" ;
              TOOLTIP "System Information and User Defined Tables"

       DEFINE BUTTON oButt7 of oBar ACTION (_WebHelp( dExe )) ;
              RESOURCE "palmetto" PROMPT "Created in SC" TOOLTIP "Help and About"
       oButt7:lTransparent = .T.
       DEFINE BUTTON oButt8 of oBar ACTION (SHELLEXECUTE(nil,"open", "calc.exe",0,0,1)) ;
              RESOURCE "calculator" PROMPT "Calculator" TOOLTIP "Calculator"
       oButt8:lTransparent = .T.

       DEFINE BUTTON oButt9 of oBar ACTION oWind:End();
              RESOURCE "exit" PROMPT "Quit" TOOLTIP "Quit"
       oButt8:lTransparent = .T.
 

Old FWH1504
Image
New FWH1612
Image
User avatar
Rick Lipkin
 
Posts: 2663
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: Button Bar Transparency with FWH 1612

Postby nageswaragunupudi » Fri Jan 13, 2017 3:05 pm

It appears from the images that:

In the first image, buttons with ltransparent set to .T. or .F., both are painted the same way. In other words the lTransparent setting did not have any effect and was not necessary.

In the second image, buttons with lTransparent set to .t. are painted transparently showing the background of the parent, i.e, the buttonbar.

Is that the point?
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10620
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Button Bar Transparency with FWH 1612

Postby Rick Lipkin » Fri Jan 13, 2017 3:59 pm

Rao

Thanks for pointing out that I had the the :lTransparent = .T. flag set for some but not all buttons. The buttons that rendered properly did not have the transparent flag .. I removed ALL the Button transparent lines and the entire button bar now works properly.

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

Re: Button Bar Transparency with FWH 1612

Postby joseluisysturiz » Fri Jan 13, 2017 4:14 pm

Rick Lipkin wrote:Rao

Thanks for pointing out that I had the the :lTransparent = .T. flag set for some but not all buttons. The buttons that rendered properly did not have the transparent flag .. I removed ALL the Button transparent lines and the entire button bar now works properly.

Thanks
Rick Lipkin


Solucion..?...gracias, saludos... :shock:
Dios no está muerto...

Gracias a mi Dios ante todo!
User avatar
joseluisysturiz
 
Posts: 2064
Joined: Fri Jan 06, 2006 9:28 pm
Location: Guatire - Caracas - Venezuela

Re: Button Bar Transparency with FWH 1612

Postby Rick Lipkin » Fri Jan 13, 2017 4:34 pm

Jose

YES .. removing oBtn:lTransparent = .T. fixed the button bar in FWH 1612 ..

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

Re: Button Bar Transparency with FWH 1612

Postby joseluisysturiz » Fri Jan 13, 2017 4:55 pm

Using google translator

It would be better if you used something like oBtnBar: Transparent: = .t., So you would apply transparency to all buttons that are in the ButtonBar, greetings, thanks ...
Dios no está muerto...

Gracias a mi Dios ante todo!
User avatar
joseluisysturiz
 
Posts: 2064
Joined: Fri Jan 06, 2006 9:28 pm
Location: Guatire - Caracas - Venezuela

Re: Button Bar Transparency with FWH 1612

Postby nageswaragunupudi » Fri Jan 13, 2017 8:10 pm

This is how it looks like when we set oBar:lTransparent := .T.

Image

Code to create Transparent Buttonbar with Transparent Buttons
Code: Select all  Expand view
#include "fivewin.ch"

//----------------------------------------------------------------------------//

function Main()

   local oWnd, oBar, oBtn, oFont, oBrush

   DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-12
   DEFINE BRUSH oBrush FILE "c:\fwh\bitmaps\sea.bmp" RESIZE
   DEFINE WINDOW oWnd TITLE "TRANSPARENT BUTTONBAR" BRUSH oBrush
   oWnd:SetFont( oFont )

   DEFINE BUTTONBAR oBar OF oWnd SIZE 72,96
   oBar:lTransparent := .t.

   DEFINE BUTTON OF oBar FILE "c:\fwh\bitmaps\32x32\copy.bmp"     PROMPT "copy"   + CRLF + "bmp"   FLAT TRANSPARENT
   DEFINE BUTTON OF oBar FILE "c:\fwh\bitmaps\32x32\paste.bmp"    PROMPT "paste"  + CRLF + "bmp"   FLAT TRANSPARENT
   DEFINE BUTTON OF oBar FILE "c:\fwh\bitmaps\pngs\image3.png"    PROMPT "image3" + CRLF + "png"   FLAT TRANSPARENT
   DEFINE BUTTON OF oBar FILE "c:\fwh\bitmaps\AlphaBmp\visa.bmp"  PROMPT "Visa"   + CRLF + "Alpha" FLAT TRANSPARENT
   DEFINE BUTTON OF oBar FILE "c:\fwh\bitmaps\AlphaBmp\ichat.bmp" PROMPT "IChat"  + CRLF + "Alpha" FLAT TRANSPARENT
   atail(obar:acontrols):nalphalevel := 100
   DEFINE BUTTON OF oBar FILE "c:\fwh\bitmaps\metro\users.bmp"    PROMPT "users"  + CRLF + "metro" FLAT TRANSPARENT
   DEFINE BUTTON OF oBar FILE "c:\fwh\bitmaps\metro\exit.bmp"     PROMPT "exit"   + CRLF + "metro" FLAT TRANSPARENT

   for each oBtn in oBar:aControls
      oBtn:SetColor( CLR_WHITE, CLR_BLACK )
   next

   ACTIVATE WINDOW oWnd CENTERED
   RELEASE FONT oFont
   RELEASE BRUSH oBrush

return nil
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10620
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Button Bar Transparency with FWH 1612

Postby joseluisysturiz » Fri Jan 13, 2017 8:25 pm

nageswaragunupudi wrote:This is how it looks like when we set oBar:lTransparent := .T.

Image

Code to create Transparent Buttonbar with Transparent Buttons
Code: Select all  Expand view
#include "fivewin.ch"

//----------------------------------------------------------------------------//

function Main()

   local oWnd, oBar, oBtn, oFont, oBrush

   DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-12
   DEFINE BRUSH oBrush FILE "c:\fwh\bitmaps\sea.bmp" RESIZE
   DEFINE WINDOW oWnd TITLE "TRANSPARENT BUTTONBAR" BRUSH oBrush
   oWnd:SetFont( oFont )

   DEFINE BUTTONBAR oBar OF oWnd SIZE 72,96
   oBar:lTransparent := .t.

   DEFINE BUTTON OF oBar FILE "c:\fwh\bitmaps\32x32\copy.bmp"     PROMPT "copy"   + CRLF + "bmp"   FLAT TRANSPARENT
   DEFINE BUTTON OF oBar FILE "c:\fwh\bitmaps\32x32\paste.bmp"    PROMPT "paste"  + CRLF + "bmp"   FLAT TRANSPARENT
   DEFINE BUTTON OF oBar FILE "c:\fwh\bitmaps\pngs\image3.png"    PROMPT "image3" + CRLF + "png"   FLAT TRANSPARENT
   DEFINE BUTTON OF oBar FILE "c:\fwh\bitmaps\AlphaBmp\visa.bmp"  PROMPT "Visa"   + CRLF + "Alpha" FLAT TRANSPARENT
   DEFINE BUTTON OF oBar FILE "c:\fwh\bitmaps\AlphaBmp\ichat.bmp" PROMPT "IChat"  + CRLF + "Alpha" FLAT TRANSPARENT
   atail(obar:acontrols):nalphalevel := 100
   DEFINE BUTTON OF oBar FILE "c:\fwh\bitmaps\metro\users.bmp"    PROMPT "users"  + CRLF + "metro" FLAT TRANSPARENT
   DEFINE BUTTON OF oBar FILE "c:\fwh\bitmaps\metro\exit.bmp"     PROMPT "exit"   + CRLF + "metro" FLAT TRANSPARENT

   for each oBtn in oBar:aControls
      oBtn:SetColor( CLR_WHITE, CLR_BLACK )
   next

   ACTIVATE WINDOW oWnd CENTERED
   RELEASE FONT oFont
   RELEASE BRUSH oBrush

return nil


Mis disculpas Mr. RAO, yo dando idea, y ya existe, gracias por el excelente trabajo, saludos, gracias... :shock:
Dios no está muerto...

Gracias a mi Dios ante todo!
User avatar
joseluisysturiz
 
Posts: 2064
Joined: Fri Jan 06, 2006 9:28 pm
Location: Guatire - Caracas - Venezuela


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 42 guests