How to clear an oImage

How to clear an oImage

Postby Ollie » Wed Jul 11, 2007 12:53 pm

When I hit the "Clear" button I still see the image - I want it to be blank.

Code: Select all  Expand view  RUN
   REDEFINE IMAGE oImage ID 4010 OF oDlg_Edit_Line FILE cImage WHEN FILE(cImage) ADJUST UPDATE
   //Load image button below
   REDEFINE BUTTON ID 4011 OF oDlg_Edit_Line ACTION ;
   ( cImage := cGetFile32("Images (*.jpg) | *.jpg |" + "All files (*.*) | *.* |", "Select an image file" ),;
   IF(FILE(cImage),(oImage:cBmpFile:=cImage,oImage:Reload(),oImage:Refresh()),NIL))
   //CLear image button below
   REDEFINE BUTTON ID 4026 OF oDlg_Edit_Line ACTION (cImage:="",oImage:cBmpFile:=cImage,oImage:Destroy(),oImage:Refresh())
Many thanks
Ollie.

Using:
xHarbour Compiler build 1.2.1 (SimpLex) (Rev. 6406)
Borland C++ 5.5.1
FWH 9.04 (2009 Apr)
Ollie
 
Posts: 233
Joined: Sat Dec 30, 2006 6:10 am

Postby antolin » Wed Jul 11, 2007 6:24 pm

Try this: oImage:Hide() + oImage:End() + oImage := NIL + SysRefresh()

Regards
antolin
 
Posts: 498
Joined: Thu May 10, 2007 8:30 pm
Location: Sevilla

Postby Ollie » Thu Jul 12, 2007 6:34 am

Thank you. oImage:Hide() gave me what I was looking for.
Many thanks
Ollie.

Using:
xHarbour Compiler build 1.2.1 (SimpLex) (Rev. 6406)
Borland C++ 5.5.1
FWH 9.04 (2009 Apr)
Ollie
 
Posts: 233
Joined: Sat Dec 30, 2006 6:10 am


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 119 guests