Btnbmp disabled()

Btnbmp disabled()

Postby MarcoBoschi » Wed Mar 14, 2012 2:31 pm

If the BTNBMP is disable it is horibble!
Any hints?

Marco

Code: Select all  Expand view
#include "fivewin.ch"
#define BS_MULTILINE 8192


FUNCTION MAIN()
 LOCAL oDlg
 LOCAL oIndietro, oAvanti
 LOCAL oFont3

 DEFINE FONT oFont3 NAME "Arial" SIZE 14, -14

 DEFINE DIALOG oDlg RESOURCE "DIALOGO"   FONT oFont3

 REDEFINE BTNBMP oIndietro RESOURCE "NORMALE" PROMPT "Forward" ID 204 OF oDlg NOBORDER
//  oIndietro:lTransparent = .T.
 oIndietro:nStyle = NOR( oIndietro:nStyle, BS_MULTILINE )

 REDEFINE BTNBMP oAvanti RESOURCE "NORMALE" PROMPT "Forward" ID 205 OF oDlg NOBORDER
//  oAvanti:lTransparent = .T.
 oAvanti = NOR( oAvanti:nStyle, BS_MULTILINE )

 ACTIVATE DIALOG oDlg CENTER ON INIT oIndietro:disable()

 RELEASE FONT oFont3


RETURN NIL
 


Image
User avatar
MarcoBoschi
 
Posts: 1065
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy

Re: Btnbmp disabled()

Postby Gale FORd » Wed Mar 14, 2012 3:03 pm

Yup, they do not always look good.
If I have a need for disabled bitmaps I create my own and add it to the command line or using oBitmap:LoadBitmaps().
Gale FORd
 
Posts: 663
Joined: Mon Dec 05, 2005 11:22 pm
Location: Houston

Re: Btnbmp disabled()

Postby ukoenig » Wed Mar 14, 2012 3:12 pm

Marco,

Yes, You have to create / select a extra Disabled-bmp

// 1 = Aktiv
// 2 = Pressed
// 3 = Disabled
// 4 = Mouse-Capt.

From Disk or Resource :

REDEFINE BTNBMP oBtn1 ID 70 OF oDlg 2007 ;
FILENAME c_path + "\Images\aktiv.bmp", ;
c_path + "\Images\pressed.bmp", ;
c_path + "\Images\disabled.bmp", ;
c_path + "\Images\Mcapture.bmp" ;

LEFT ;
PROMPT " &Exit " ;
FONT oProgFont ;
ACTION ( oDlg:End(), oWnd:End() )
oBtn1:lTransparent = .t.
oBtn1:cTooltip := { "Close" + CRLF + ;
"the Button-Test","Close Test", 1, CLR_BLACK, 14089979 }

Maybe a disabled Button is included for You
Right Mouseclick to copy :

Image
Image
Image
Image
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: Btnbmp disabled()

Postby MarcoBoschi » Thu Mar 15, 2012 8:35 am

Thank you guys!

Uwe,
Is it normal that after the conversion from PNG to BMP the image loses quality?
This is the original png
Image

This is bmp (converted using Paint or Iirfanview is the same)

Image
User avatar
MarcoBoschi
 
Posts: 1065
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy

Re: Btnbmp disabled()

Postby ukoenig » Thu Mar 15, 2012 9:55 am

Marco,

I use < Pixelformer > it is free and works fine for me.
Give it a try.

Download :
http://www.qualibyte.com/

viewtopic.php?f=3&t=21546&p=114491&hilit=pixelformer#p114491

Image

Image

converted to BMP with the same Quality :

Image

Best Regards
Uwe :lol:
Last edited by ukoenig on Thu Feb 25, 2016 6:59 pm, edited 2 times in total.
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: Btnbmp disabled()

Postby MarcoBoschi » Thu Mar 15, 2012 11:31 am

Thank you , uwe.
Fantastic!

To Antonio: the added value of fivewin: professional kind, helpful and prepared!

:D CONGRATULATIONS :D
User avatar
MarcoBoschi
 
Posts: 1065
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 50 guests