BTNBMP problem

Post Reply
ask
Posts: 99
Joined: Wed Nov 02, 2005 10:40 am

BTNBMP problem

Post 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]
User avatar
mmercado
Posts: 782
Joined: Wed Dec 19, 2007 7:50 am
Location: Salamanca, Gto., México

Re: BTNBMP problem

Post 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
ask
Posts: 99
Joined: Wed Nov 02, 2005 10:40 am

Re: BTNBMP problem

Post 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
Post Reply