OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: velasquez on January 26, 2010, 09:49:00 AM

Title: dcl_Form_Resize and Offset From Rigth Edge in OpenDCL 6.0.0.20
Post by: velasquez on January 26, 2010, 09:49:00 AM
Hi Owen 
See in this video that happens when I work with dcl_Form_Resize.
 
Velasquez
Title: Re: dcl_Form_Resize and Offset From Rigth Edge in OpenDCL 6.0.0.20
Post by: owenwengerd on January 26, 2010, 11:49:37 AM
Can you be more specific about what the problem is?

BTW, I enever received a reply to my email about the file that you sent recently by email.
Title: Re: dcl_Form_Resize and Offset From Rigth Edge in OpenDCL 6.0.0.20
Post by: velasquez on January 26, 2010, 01:57:39 PM
Owen, 
I didn't receive your e-mail. 
I will see what happened with my internet provider. 
 
BTW, will post a gif showing as mine form works with OpenDCL 4.1.2.2 
Title: Re: dcl_Form_Resize and Offset From Rigth Edge in OpenDCL 6.0.0.20
Post by: velasquez on January 26, 2010, 02:37:23 PM
Owen 

Please see what happens with the position of the small buttons when I use dcl_Form_Resize in OpenDCL 4.1.2.2.

Thanks
Title: Re: dcl_Form_Resize and Offset From Rigth Edge in OpenDCL 6.0.0.20
Post by: Kerry on January 27, 2010, 01:37:08 AM
velasquez
How is the button location defined ?
From Left or from Right ??
Title: Re: dcl_Form_Resize and Offset From Rigth Edge in OpenDCL 6.0.0.20
Post by: velasquez on January 27, 2010, 02:31:13 AM
Hi Kerry, 
 
I defined the location like Rigth.

Title: Re: dcl_Form_Resize and Offset From Rigth Edge in OpenDCL 6.0.0.20
Post by: Kerry on January 27, 2010, 02:51:32 AM
Change the 2 buttons to be 'LEFT from the LEFT' edge.
Then they won't move when you resize the form.
Title: Re: dcl_Form_Resize and Offset From Rigth Edge in OpenDCL 6.0.0.20
Post by: velasquez on January 27, 2010, 03:16:55 AM
The one that I want is that the buttons move with the resize in the way. 
The first image that I posted display the buttons moving but a copy of the image is arrested in the origin place. 
 
The second image shows the movement corrteto of the buttons with Resize. 
But that is gotten with an old version of OpenDCL.
Title: Re: dcl_Form_Resize and Offset From Rigth Edge in OpenDCL 6.0.0.20
Post by: velasquez on January 27, 2010, 03:49:46 AM
I observed that this problem doesn't always happen just after several actions. 
This can be related with operating system problems.
Title: Re: dcl_Form_Resize and Offset From Rigth Edge in OpenDCL 6.0.0.20
Post by: owenwengerd on January 27, 2010, 09:41:43 AM
This should be a problem that is easy to fix if I can reproduce it here.  Can you send me a test case and instructions for reproducing?
Title: Re: dcl_Form_Resize and Offset From Rigth Edge in OpenDCL 6.0.0.20
Post by: velasquez on January 27, 2010, 12:12:37 PM
Ok Owen, 
I will prepare the files and to post here. 
I will make this next weekend.
Title: Re: dcl_Form_Resize and Offset From Rigth Edge in OpenDCL 6.0.0.20
Post by: velasquez on February 02, 2010, 03:05:07 AM
Hi Owen 
I am posting the files for you to reproduce the problem that I found. 
See below in the illustration how to reproduce the problem. 
Title: Re: dcl_Form_Resize and Offset From Rigth Edge in OpenDCL 6.0.0.20
Post by: owenwengerd on February 02, 2010, 12:48:39 PM
This problem is caused by an optimization in the way picture boxes work. After the picturebox is finished painting itself, it takes a snapshot of wha is displayed, then just repaints the saved snapshot. In this case, the saved snapshot includes the overlapped buttons if they happen to be painted after the background and before the snapshot is saved.

You should be able to refresh the background picture box to repaint it without using the saved snapshot. If you call dcl_PictureBox_Refresh after the expansion is complete, your dialog should work correctly. Please try this and reply here to let me know whether that resolves the problem.
Title: Re: dcl_Form_Resize and Offset From Rigth Edge in OpenDCL 6.0.0.20
Post by: velasquez on February 02, 2010, 02:09:23 PM
OK very good dcl_PictureBox_Refresh made my dialogue to work correctly

I will speak about a new problem. 
After the expansion i completes I call (dcl_Form_Center DuctilCAD_DuctilCAD_MainForm)
please see as the buttons they are shown in the screen of AutoCAD. 
Didn't this happen some work before it is possible with this?
Title: Re: dcl_Form_Resize and Offset From Rigth Edge in OpenDCL 6.0.0.20
Post by: owenwengerd on February 03, 2010, 04:42:44 PM
Quote from: velasquez on February 02, 2010, 02:09:23 PM
After the expansion i completes I call (dcl_Form_Center DuctilCAD_DuctilCAD_MainForm)
please see as the buttons they are shown in the screen of AutoCAD. 
Didn't this happen some work before it is possible with this?

I'm not sure what you mean. I tested your file, and although I think it's a bad UI design to change the dialog position when expanding and collapsing, it appears to work as expected on my system.