Page 1 of 1

Btnbmp disabled()

Posted: Wed Mar 14, 2012 2:31 pm
by MarcoBoschi
If the BTNBMP is disable it is horibble!
Any hints?

Marco

Code: Select all | Expand

#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

Re: Btnbmp disabled()

Posted: Wed Mar 14, 2012 3:03 pm
by Gale FORd
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().

Re: Btnbmp disabled()

Posted: Wed Mar 14, 2012 3:12 pm
by ukoenig
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:

Re: Btnbmp disabled()

Posted: Thu Mar 15, 2012 8:35 am
by MarcoBoschi
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

Re: Btnbmp disabled()

Posted: Thu Mar 15, 2012 9:55 am
by ukoenig
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:

Re: Btnbmp disabled()

Posted: Thu Mar 15, 2012 11:31 am
by MarcoBoschi
Thank you , uwe.
Fantastic!

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

:D CONGRATULATIONS :D