BTNBMP transparent

BTNBMP transparent

Postby camelot » Thu May 31, 2007 6:29 am

Hi,
i have some btnbmp on folder with xp style.
Have anyone a solution to get Btnbmp transparent.

i use FWH 7.01 and Harbour alpha build 1.0

Thanks in advance.
Uwe
camelot
 
Posts: 6
Joined: Wed May 30, 2007 1:17 pm

Postby Antonio Linares » Thu May 31, 2007 6:39 am

regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42078
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby camelot » Thu May 31, 2007 8:45 am

Antonio,

your sample do not work.

for example my sourcecode:
The oBtn is not transparent now.

DEFINE DIALOG oAuf:oDlgAuf RESOURCE "Aufmsk0" ICON oIauf

REDEFINE FOLDER oAuf:oFauf ID 100 OF oAuf:oDlgauf ;
ITEMS " Auftrags&kopf ", " Auftrags&positionen " ;
DIALOGS "Aufmsk1", "Aufmsk2";

REDEFINE BTNBMP oBtn ID 123 noborder;
RESOURCE "suchen1","","suchen11" OF ::oFauf:aDialogs[1]
WHEN ::lNeu .AND. ! ::lNeuAppend ;
ACTION (Msgstop())

Image

regards
Uwe
camelot
 
Posts: 6
Joined: Wed May 30, 2007 1:17 pm

Postby carlos.mora » Thu May 31, 2007 7:25 pm

Read again the code that Antonio refered you, detailed. Your code does not reflects the Antonio advice. Pay attention and read it again, I´m sure the answer is there.

Regards,

Carlos
carlos.mora
 
Posts: 6
Joined: Sun Jan 29, 2006 7:43 pm

Postby Antonio Linares » Thu May 31, 2007 7:54 pm

You are missing this:

DEFINE DIALOG oDlg ... TRANSPARENT

...

oBtn:lTransparent = .T.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42078
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby camelot » Fri Jun 01, 2007 8:22 am

Hi,

I have changed my code to the following, but it takes no effect. The BTNBMP are not transparent. Is the problem maybe in the resourceeditor,i use Visual c++ 6.0 or must i have a specially backround color for the bitmap that is in the resourceeditor?

DEFINE DIALOG oDlgAuf RESOURCE "Aufmsk0" ICON oIauf TRANSPARENT

REDEFINE FOLDER oFauf ID 100 OF oDlgauf ;
ITEMS " Auftrags&kopf ", " Auftrags&positionen " ;
DIALOGS "Aufmsk1", "Aufmsk2";

REDEFINE BTNBMP oBtn ID 156 noborder;
RESOURCE "AKONTO1","","AKONTO11" OF ::oFauf:aDialogs[1] ;
ACTION (Msgstop());
TOOLTIP "A-Kontobetrag" ;
MESSAGE "A-Kontobetrag bearbeiten"

oBtn:ltransparent = .T.

Thanks in advance.
Uwe
camelot
 
Posts: 6
Joined: Wed May 30, 2007 1:17 pm

Postby Antonio Linares » Fri Jun 01, 2007 8:35 am

Please test this sample:
Code: Select all  Expand view
#include "FiveWin.ch"

function Main()

   local oDlg, oBtn

   DEFINE DIALOG oDlg TRANSPARENT

   @ 10, 10 BTNBMP oBtn FILENAME "About.bmp" NOBORDER
   
   oBtn:lTransparent = .T.

   ACTIVATE DIALOG oDlg

return nil
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42078
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby camelot » Fri Jun 01, 2007 9:11 am

Antonio,

your sample works fine,but my BTNBMP is not not on a dialog but also on a Folder.

regards
Uwe
camelot
 
Posts: 6
Joined: Wed May 30, 2007 1:17 pm

Postby Antonio Linares » Fri Jun 01, 2007 9:40 am

Then try this:

oFolder:aDialogs[ n ]:lTransparent = .T.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42078
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby camelot » Fri Jun 01, 2007 11:04 am

Antonio,

sorry, but no effect.
The Folder is in the Resourceeditor declared as SysTabControl32.
The BTNBMP on the Dialog are OK.
Do you have an other idea.

regards,
Uwe
camelot
 
Posts: 6
Joined: Wed May 30, 2007 1:17 pm

Postby Antonio Linares » Fri Jun 01, 2007 11:19 am

Uwe,

You may use a Class TButtonBmp object instead of a TBtnBmp one, as TButtonBmp uses the XP themes and will look better

Please review samples\TestBuBm.prg
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42078
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 60 guests

cron