Page 1 of 1

BTNBMP problem

Posted: Thu Feb 28, 2008 10:03 am
by ask
The following example is btntrans.prg except that i reset the border with ResetBorder .You will see it is not working. Can someone tells me why?

Thanks
A.S.K

Code: Select all


// Testing a transparent TBtnBmp on a transparent DialogBox

#include "FiveWin.ch"

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

function Main()

   local oBru, oDlg, oBtn

   DEFINE BRUSH oBru FILENAME "../bitmaps/Backgrnd/beach.bmp"

   DEFINE DIALOG oDlg SIZE 400, 200 BRUSH oBru TRANSPARENT

   @ 2, 2 SAY "Hello" OF oDlg
   oDlg:aControls[ 1 ]:lTransparent = .t.

   @ 70, 80 BTNBMP oBtn FILENAME "../bitmaps/yes.bmp" ;
      SIZE 50, 30 OF oDlg ACTION MsgInfo( "click" )
      
   oBtn:lTransparent = .T.   
   oBtn:ResetBorder()
      
   ACTIVATE DIALOG oDlg CENTERED

return nil

//----------------------------------------------------------------------------//
[/b]

Re: BTNBMP problem

Posted: Thu Feb 28, 2008 2:47 pm
by mmercado
ask wrote: @ 70, 80 BTNBMP oBtn FILENAME "../bitmaps/yes.bmp" ;
SIZE 50, 30 OF oDlg ACTION MsgInfo( "click" )
Try this:

Code: Select all

   @ 70, 80 BTNBMP oBtn FILENAME "../bitmaps/yes.bmp" ;
      SIZE 50, 30 OF oDlg ACTION MsgInfo( "click" ) NOBORDER

   oBtn:lTransparent = .T
Regards

Manuel Mercado

Re: BTNBMP problem

Posted: Thu Feb 28, 2008 3:19 pm
by ask
mmercado wrote:
ask wrote: @ 70, 80 BTNBMP oBtn FILENAME "../bitmaps/yes.bmp" ;
SIZE 50, 30 OF oDlg ACTION MsgInfo( "click" )
Try this:

Code: Select all

   @ 70, 80 BTNBMP oBtn FILENAME "../bitmaps/yes.bmp" ;
      SIZE 50, 30 OF oDlg ACTION MsgInfo( "click" ) NOBORDER

   oBtn:lTransparent = .T
Regards

Manuel Mercado
Thank you for your reply but this is exactly what i don't want to do

regards,
A.S.K