is it possible, to Update the Bitmaps ( for TButtonBMP ) in a Folder-Page,
defined new, inside another Page ?
My Problem :
Changing the Skin, works on Folder and Dialog.
Changing the Button-Bmp works only on Dialog.
After a Folder-Page-Change, the Button shows still the old BMP, defined on Init.
Is it possible to Update the Buttons in Folder-Page 5 ( Repaint ) with the new BMP's from the BMP-Editor ???
The Array < aPICTURES[1][3] > stores the BMP's
REDEFINE BUTTONBMP oBtn1 ID 110 OF oFld:aDialogs[5] ;
ACTION MsgAlert("Test" ) ;
BITMAP aPICTURES[1][3] PROMPT "1. Btn (16x16)" TEXTRIGHT
oBtn1:cToolTip = { "TButtonBMP","Test", 1, CLR_BLACK, 14089979 }
oBtn1:oFont := oTextFont
I used ( doesn't work ) :
- Code: Select all Expand view
REDEFINE FOLDER oFld ID 100 OF oDlg TRANSPARENT UPDATE ;
PROMPTS " &Dialog-Backgrd.", " &Normal / Focus / Pressed ", " &Font / Border / Source / Activation ", " &TButton-Test ", "TButton&BMP-Test " ;
DIALOGS "Painter", "Background", "Titles", "Buttons1", "Buttons2" FONT oFoldFont ;
ON CHANGE( UPD_FOLDER( oFld, nOption, nOldOption ) )
//----------------------------------------------------------------------------//
STATIC FUNCTION UPD_FOLDER( oFld, nOption, nOldOption )
LOCAL n, oDlg
IF nOption == 5 // Buttons to be Updated
FOR n = 1 to Len( oFld:aDialogs )
oDlg = oFld:aDialogs[ n ]
IF n = 5
oDlg:bPainted = { | hDC | oFld:aDialogs[5]:Refresh() }
ENDIF
NEXT
ENDIF
RETURN .T.
The Function works perfect, to change the Background of Page 4 and 5
with the Background-Selection, done in Page 1
- Code: Select all Expand view
STATIC FUNCTION TEST_FOLD( oFld, nOption, nOldOption )
LOCAL n, oDlg
IF nOption > 3 // Background-Change only for Folder-Page 4 and 5
// ------------------------------------------------------------------------
FOR n = 1 to Len( oFld:aDialogs )
oDlg = oFld:aDialogs[ n ]
IF n > 3 .and. W_STYLE = 1 // Gradient
IF W_DIRECT = 1
oDlg:bPainted = { | hDC | GradientFill( hDC, 0, 0, oDlg:nHeight, ;
oDlg:nWidth, { { W_MOVE, W_COLOR1, W_COLOR2 }, ;
{ W_MOVE, W_COLOR2, W_COLOR1 } }, .T. ) }
ELSE
oDlg:bPainted = { | hDC | GradientFill( hDC, 0, 0, oDlg:nHeight, ;
oDlg:nWidth, { { W_MOVE, W_COLOR1, W_COLOR2 }, ;
{ W_MOVE, W_COLOR2, W_COLOR1 } }, .F. ) }
ENDIF
ENDIF
IF n > 3 .and. W_STYLE = 2 // 1 Color
oDlg:bPainted = { | hDC | GradientFill( hDC, 0, 0, oDlg:nHeight, ;
oDlg:nWidth, { { W_MOVE, W_COLOR1, W_COLOR1 }, ;
{ W_MOVE, W_COLOR1, W_COLOR1 } }, .T. ) }
ENDIF
NEXT
ENDIF
RETURN .T.
Best regards
Uwe