OpenDCL Forums

OpenDCL => Studio/Dialog Editor => Topic started by: mike on October 02, 2014, 08:39:57 AM

Title: PictureBox StoreImage and Refresh
Post by: mike on October 02, 2014, 08:39:57 AM
well, I'm using these functions and the result is not expected, because instead of drawing the last stored image only cleans the picture  box...
my opendcl version is 8.0.0.8 and autocad 2012 32 bits

help me

Title: Re: PictureBox StoreImage and Refresh
Post by: owenwengerd on October 02, 2014, 08:56:18 AM
You're more likely to get help if you include a minimal sample that demonstrates the problem, or at least provide sufficient detail for someone to reproduce it.
Title: Re: PictureBox StoreImage and Refresh
Post by: mike on October 02, 2014, 04:55:34 PM
Well Owen, im drawing in a picture box, i trace some segments of lines and i want to delete a segment, my idea is save an image previous to draw the last segment, and if i wish to delete, restore the last image saved...something as follow:

(defun draw_segment( / )
(dcl-PictureBox-StoreImage DefProy/Form1/PictureBox1)
.
.
.
)

(defun erase_segment( / )
.
.
(dcl-PictureBox-Refresh DefProy/Form1/PictureBox1)
)

Hope if that is enough to explain me...
thanks
Title: Re: PictureBox StoreImage and Refresh
Post by: owenwengerd on October 02, 2014, 11:19:37 PM
I can confirm that the behavior of (dcl-PictureBox-Refresh) does not match the documentation. I'm not sure if there was an intentional design change and the documentation didn't get updated, or the change was made for some other purposes without realizing its side effects. In any case, I have fixed the code for the next build so the function behaves as documented. In the meantime, try using (dcl-Control-Redraw (http://www.opendcl.com/HelpFiles/index.php?page=Reference/Method/Control/Redraw.htm)) instead. It should have the same effect.
Title: Re: PictureBox StoreImage and Refresh
Post by: mike on October 03, 2014, 09:28:45 AM
Hello Owen,
apparently are only invested the concepts of the functions in the help!
:)