Hello,
I want to change the Images and Text without destroying the VTitle.
I tested ( only one Image ) on Button-click with :
Button 1
oTitle:ChangeImg( c_Path + "\Bitmaps\Mouse1.bmp", 1 )
Button 2
oTitle:ChangeImg( c_Path + "\Bitmaps\Mouse2.bmp", 1 )
Button 3
oTitle:ChangeImg( c_Path + "\Bitmaps\Mouse3.bmp", 1 )
Button 4
oTitle:ChangeImg( c_Path + "\Bitmaps\Mouse4.bmp", 1 )
That didn't work !!!
The same I need, to change the Text.

My Problem
:

SOLVED ( works perfect now ) !!!
I changed the Replace-function, clearing the Image- and TextArray, like :
Best Regards
Uwe
I want to change the Images and Text without destroying the VTitle.
I tested ( only one Image ) on Button-click with :
Button 1
oTitle:ChangeImg( c_Path + "\Bitmaps\Mouse1.bmp", 1 )
Button 2
oTitle:ChangeImg( c_Path + "\Bitmaps\Mouse2.bmp", 1 )
Button 3
oTitle:ChangeImg( c_Path + "\Bitmaps\Mouse3.bmp", 1 )
Button 4
oTitle:ChangeImg( c_Path + "\Bitmaps\Mouse4.bmp", 1 )
That didn't work !!!
The same I need, to change the Text.

My Problem

SOLVED ( works perfect now ) !!!
I changed the Replace-function, clearing the Image- and TextArray, like :
// -----------------------------
FUNCTION CHANGE_PROD(oTitle10, oFont9, nProduct )
oTitle10:aText := {}
oTitle10:aImgs := {}
oTitle10:Refresh()
IF nProduct = 1
  oTitle10:AddText( 15, 15, "Product 1", , , , , oFont9, 128, )
  oTitle10:AddText( 45, 15, "Product 1 Info 1", , , , , oSysFont, 0, )
  oTitle10:AddText( 60, 15, "Product 1 Info 2", , , , , oSysFont, 0, )
  oTitle10:AddText( 75, 15, "Product 1 Info 3", , , , , oSysFont, 0, )
  oTitle10:LoadBitmaps( c_Path + "\Bitmaps\Mouse1.bmp", 15, 160, 50, 50, 255, .F., .T., .F., {|| MsgAlert( "Product 1" )} )
ENDIF
IF nProduct = 2
  oTitle10:AddText( 15, 15, "Product 2", , , , , oFont9, 128, )
  oTitle10:AddText( 45, 15, "Product 2 Info 1", , , , , oSysFont, 0, )
  oTitle10:AddText( 60, 15, "Product 2 Info 2", , , , , oSysFont, 0, )
  oTitle10:AddText( 75, 15, "Product 2 Info 3", , , , , oSysFont, 0, )
  oTitle10:LoadBitmaps( c_Path + "\Bitmaps\Mouse2.bmp", 15, 160, 50, 50, 255, .F., .T., .F., {|| MsgAlert( "Product 2" )} )
ENDIF
IF nProduct = 3
  oTitle10:AddText( 15, 15, "Product 3", , , , , oFont9, 128, )
  oTitle10:AddText( 45, 15, "Product 3 Info 1", , , , , oSysFont, 0, )
  oTitle10:AddText( 60, 15, "Product 3 Info 2", , , , , oSysFont, 0, )
  oTitle10:AddText( 75, 15, "Product 3 Info 3", , , , , oSysFont, 0, )
  oTitle10:LoadBitmaps( c_Path + "\Bitmaps\Mouse3.bmp", 15, 160, 50, 50, 255, .F., .T., .F., {|| MsgAlert( "Product 3" )} )
ENDIF
IF nProduct = 4
  oTitle10:AddText( 15, 15, "Product 4", , , , , oFont9, 128, )
  oTitle10:AddText( 45, 15, "Product 4 Info 1", , , , , oSysFont, 0, )
  oTitle10:AddText( 60, 15, "Product 4 Info 2", , , , , oSysFont, 0, )
  oTitle10:AddText( 75, 15, "Product 4 Info 3", , , , , oSysFont, 0, )
  oTitle10:LoadBitmaps( c_Path + "\Bitmaps\Mouse4.bmp", 15, 160, 50, 50, 255, .F., .T., .F., {|| MsgAlert( "Product 4" )} )
ENDIF
oTitle10:Refresh()
@ 95, 170 BTNBMP oBtn OF oTitle10 2007 ;
SIZE 50, 40 PIXEL ;
BORDER ;
FILENAME c_path + "\Bitmaps\Btn1.Bmp", ;
      c_path + "\Bitmaps\Btn2.Bmp", ;
      c_path + "\Bitmaps\Btn3.Bmp", ;
      c_path + "\Bitmaps\Btn4.Bmp" ;
ACTION Â MsgAlert( "Test" )
oBtn10:lTransparent := .t. Â
oBtn10:cToolTip = Â { "Product 1","Show Info", 1, CLR_BLACK, 14089979 }
oBtn10:SetColor( 0, )
RETURN NILBest 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.