Btnbmp disabled()

Post Reply
User avatar
MarcoBoschi
Posts: 1071
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy
Contact:

Btnbmp disabled()

Post 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
Marco Boschi
info@marcoboschi.it
Gale FORd
Posts: 663
Joined: Mon Dec 05, 2005 11:22 pm
Location: Houston
Contact:

Re: Btnbmp disabled()

Post 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().
User avatar
ukoenig
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany
Contact:

Re: Btnbmp disabled()

Post 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:
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
MarcoBoschi
Posts: 1071
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy
Contact:

Re: Btnbmp disabled()

Post 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
Marco Boschi
info@marcoboschi.it
User avatar
ukoenig
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany
Contact:

Re: Btnbmp disabled()

Post 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:
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
MarcoBoschi
Posts: 1071
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy
Contact:

Re: Btnbmp disabled()

Post by MarcoBoschi »

Thank you , uwe.
Fantastic!

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

:D CONGRATULATIONS :D
Marco Boschi
info@marcoboschi.it
Post Reply