OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: Peter2 on July 28, 2016, 04:48:33 AM

Title: dcl-PictureBox-DrawText - text disappears
Post by: Peter2 on July 28, 2016, 04:48:33 AM
I have some "Picture-Boxes" where I load picture, set Tooltip and create "Draw text":

Code (autolisp) Select

(dcl-PictureBox-LoadPictureFile (eval (read WMFViewName)) WMFName T)
(dcl-Control-SetToolTipTitle (eval (read WMFViewName)) tafel)
(dcl-PictureBox-DrawText (eval (read WMFViewName)) (list (list 5 0 2 5 tafel 0)))


Everything works fine, but when I click on an image the drawn text disappears. All boxes have a Doubleclick event; only some have a OnClick Event but no code behind.

Is it by design? Are the "Draw-Methods" only temporary?

Peter
Title: Re: dcl-PictureBox-DrawText - text disappears
Post by: owenwengerd on July 29, 2016, 05:48:06 AM
The Draw methods draw temporary graphics. You can use dcl-PictureBox-StoreImage (http://www.opendcl.com/HelpFiles/index.php?page=Reference/Method/PictureBox/StoreImage.htm) to make it permanent.
Title: Re: dcl-PictureBox-DrawText - text disappears
Post by: Peter2 on August 05, 2016, 01:45:44 AM
Thanks Owen!