Any examples where a GET of a logical field is being substituted with a on/off yes/no etc bitmaps
Thanks
Peter
GET logical value represented by bitmap
- nageswaragunupudi
- Posts: 10729
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Been thanked: 10 times
- Contact:
Re: GET logical value represented by bitmap
Use CHECKBOX or SWITCH controls instead of GET
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
Re: GET logical value represented by bitmap
Peter
the solution You are looking for
GET and a btnbmp ( with image-switch )
display any info like ".T." or ".F." ( as string ) inside a get
the image is displayed as yes or no and belongs to a selected logical var-status

regards
Uwe
the solution You are looking for

GET and a btnbmp ( with image-switch )
I've used BTNBMP
display any info like ".T." or ".F." ( as string ) inside a get
the image is displayed as yes or no and belongs to a selected logical var-status

regards
Uwe

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.
i work with FW.
If you have any questions about special functions, maybe i can help.
Re: GET logical value represented by bitmap
Thanks Uwe
I will try it out
The bitmap is working and from code there is no border, which was I want but from resource it keeps the border
Regards
Peter
I will try it out
The bitmap is working and from code there is no border, which was I want but from resource it keeps the border
Regards
Peter
Code: Select all | Expand
#Include "FiveWin.Ch"
Function Main()
Local oDlg,oBtn
LOCAL lFlag := .f.
DEFINE DIALOG oDlg RESOURCE 1001
REDEFINE BTNBMP oBtn ID 4001 NOBORDER OF oDlg ;
FILE IIF( lFlag, "..\bitmaps\on.bmp", "..\bitmaps\off.bmp" ) ;
ACTION ( lFlag := ! lFlag, oBtn:loadbitmaps( IIF(lFlag, "..\bitmaps\on.bmp", "..\bitmaps\off.bmp" )),obtn:refresh() )
ACTIVATE DIALOG oDlg
return nil
Code: Select all | Expand
// RESOURCE SCRIPT generated by "Pelles C for Windows, version 8.00".
#include <windows.h>
#include <commctrl.h>
#include <richedit.h>
#include "resource.h"
LANGUAGE LANG_ENGLISH,SUBLANG_ENGLISH_US
1001 DIALOGEX DISCARDABLE 6, 18, 210, 142
STYLE DS_SHELLFONT|WS_POPUP|DS_MODALFRAME|DS_CONTEXTHELP|DS_3DLOOK|WS_CAPTION|WS_SYSMENU|WS_VISIBLE
CAPTION "Dialog"
FONT 8, "Tahoma"
{
CONTROL "", 4001, "Button", BS_BITMAP|BS_OWNERDRAW|BS_FLAT|WS_TABSTOP, 65, 65, 50, 14, WS_EX_TRANSPARENT
}
Re: GET logical value represented by bitmap
In the meantime just try
REDEFINE BTNBMP oBtn ID 4001 NOBORDER OF oDlg ;
FILE IIF( lFlag, "..\bitmaps\on.bmp", "..\bitmaps\off.bmp" ) ;
ACTION ( lFlag := ! lFlag, ;
::SetImages( If( lFlag, "..\bitmaps\on.bmp", ;
"..\bitmaps\off.bmp" ) ) )
METHOD ReDefine( nId, cResName1, cResName2, cBmpFile1, cBmpFile2,;
cMsg, bAction, oBar, lAdjust, bWhen, lUpdate,;
cToolTip, cPrompt, oFont, cResName3,;
cBmpFile3, lBorder , cLayout, cResName4, cBmpFile4, lTransparent,;
lRound, bGradColors )
regards
uwe
REDEFINE BTNBMP oBtn ID 4001 NOBORDER OF oDlg ;
FILE IIF( lFlag, "..\bitmaps\on.bmp", "..\bitmaps\off.bmp" ) ;
ACTION ( lFlag := ! lFlag, ;
::SetImages( If( lFlag, "..\bitmaps\on.bmp", ;
"..\bitmaps\off.bmp" ) ) )
METHOD ReDefine( nId, cResName1, cResName2, cBmpFile1, cBmpFile2,;
cMsg, bAction, oBar, lAdjust, bWhen, lUpdate,;
cToolTip, cPrompt, oFont, cResName3,;
cBmpFile3, lBorder , cLayout, cResName4, cBmpFile4, lTransparent,;
lRound, bGradColors )
regards
uwe

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.
i work with FW.
If you have any questions about special functions, maybe i can help.
Re: GET logical value represented by bitmap
using NOBORDER or lborder := .f. has the same result
i.e.
when the mouse is over the bitmap the border appears but when created from code it doesn't
Regards
Peter
i.e.
when the mouse is over the bitmap the border appears but when created from code it doesn't
Regards
Peter