2011-03-14 11:20 UTC
Hi
I try to use DrawLine to change a PictureBox appearance instead of changing it's Picture property.
But I first meet this problem : the drawing made by DrawLine is erased when the cursor passes over the PictureBox (rollover). It's cleared only the first time...
This problem appears when the PictureBox has a OnClick event
Please try the sample below, then disabled PictureBox_OnClick event, save and run again.
Another thing I wonder (I don't know if it's normal) is why DrawLine doesn't work when called from OnInitialize.. it must be called before to make the "first" drawing ?
(defun c:go ()
(command "OPENDCL")
(dcl_Project_Load "draw" T)
(dcl_Form_Show draw_Form1)
(Draw)
(princ)
)
(defun c:draw_Form1_OnInitialize (/)
(Draw) ; this one doesn't work ??
(princ)
)
(defun c:draw_Form1_TextButton1_OnClicked (/)
(Draw)
)
(defun Draw ()
(dcl_PictureBox_DrawLine draw_Form1_PictureBox1 '((22 10 22 34 0) (10 22 34 22 0)))
)
I try to use DrawLine to change a PictureBox appearance instead of changing it's Picture property.
But I first meet this problem : the drawing made by DrawLine is erased when the cursor passes over the PictureBox (rollover). It's cleared only the first time...
This problem appears when the PictureBox has a OnClick event
Please try the sample below, then disabled PictureBox_OnClick event, save and run again.
Another thing I wonder (I don't know if it's normal) is why DrawLine doesn't work when called from OnInitialize.. it must be called before to make the "first" drawing ?
(defun c:go ()
(command "OPENDCL")
(dcl_Project_Load "draw" T)
(dcl_Form_Show draw_Form1)
(Draw)
(princ)
)
(defun c:draw_Form1_OnInitialize (/)
(Draw) ; this one doesn't work ??
(princ)
)
(defun c:draw_Form1_TextButton1_OnClicked (/)
(Draw)
)
(defun Draw ()
(dcl_PictureBox_DrawLine draw_Form1_PictureBox1 '((22 10 22 34 0) (10 22 34 22 0)))
)