Hi,
can I use png in toolbars , btnbmps ? If yes , how ? Through TImage class ? Or I must convert png to bmps ?
With best regards !
...
DEFINE IMAGELIST oImageList SIZE 28, 28
oImageList:Add( TBitmap():Define( , cKelias_bmp + "copy.png", oWndPagr ), ;
TBitmap():Define( , cKelias_bmp + "disabled\copy.png", oWndPagr ) )
oImageList:Add( TBitmap():Define( , cKelias_bmp + "cut.png", oWndPagr ), ;
TBitmap():Define( , cKelias_bmp + "disabled\cut.png", oWndPagr ) )
...
/* use this code if you call by FILENAME
DEFINE BUTTON oButt1 OF oBar FILENAME ( cDEFA+"\ICONS\BUILDING.BMP" ), ;
( cDEFA+"\ICONS\DBUILDING.BMP" ) ,( cDEFA+"\ICONS\DBUILDING.BMP" ) ;
MESSAGE "Property Information" ;
ACTION _PropBrow( oWnd,oBar ) ;
PROMPT "Property"
oButt1:cToolTip := { " " + CRLF + "Property Info", "Property Info", 1, CLR_BLACK, 14089979 }
*/
// use this code if you have imported your icons to .dll or compiled into your .exe
DEFINE BUTTON oButt1 OF oBar RESOURCE "BUILDING" , ;
"DBUILDING", "DBUILDING" ;
MESSAGE "Property Information" ;
ACTION _PropBrow( oWnd,oBar ) ;
PROMPT "Property"
oButt1:cToolTip := { " " + CRLF + "Property Info", "Property Info", 1, CLR_BLACK, 14089979 }
Rick Lipkin wrote:Rimantas
Consider this code .. note you can use FILENAME or RESOURCE to call your icons... Your disabled icon ( second icon parameter ) needs to be a different image of the first .. only desaturated in greyscale as in the pictures below.
Rick
- Code: Select all Expand view
/* use this code if you call by FILENAME
DEFINE BUTTON oButt1 OF oBar FILENAME ( cDEFA+"\ICONS\BUILDING.BMP" ), ;
( cDEFA+"\ICONS\DBUILDING.BMP" ) ,( cDEFA+"\ICONS\DBUILDING.BMP" ) ;
MESSAGE "Property Information" ;
ACTION _PropBrow( oWnd,oBar ) ;
PROMPT "Property"
oButt1:cToolTip := { " " + CRLF + "Property Info", "Property Info", 1, CLR_BLACK, 14089979 }
*/
// use this code if you have imported your icons to .dll or compiled into your .exe
DEFINE BUTTON oButt1 OF oBar RESOURCE "BUILDING" , ;
"DBUILDING", "DBUILDING" ;
MESSAGE "Property Information" ;
ACTION _PropBrow( oWnd,oBar ) ;
PROMPT "Property"
oButt1:cToolTip := { " " + CRLF + "Property Info", "Property Info", 1, CLR_BLACK, 14089979 }
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 83 guests