Posted 16 April 2020, 8:43 am EST
Hi, when autosize =true for c1Input that docked in the parent, changed the width and height, but if docket to top or bottom it must only resize the height and if docked in left or right, resize the width.
Forums Home / ComponentOne / WinForms Edition
Posted by: moridi on 16 April 2020, 8:43 am EST
Posted 16 April 2020, 8:43 am EST
Hi, when autosize =true for c1Input that docked in the parent, changed the width and height, but if docket to top or bottom it must only resize the height and if docked in left or right, resize the width.
Posted 18 April 2020, 2:14 am EST
Hello,
That is not how the control resizes. The correct behavior is that when the control (with AutoSize) is docked to Top/Bottom/Fill, only its Width should change and when docked to Left/Right neither Height nor Width should change.
To check, whether ComponentOne’s Input controls conform the above behavior/not, I tested C1NumericEdit with latest 2020v1 version and following are my observations (with AutoSize = True):
Dock = Fill - > Width changes
Dock = Left/Right → Neither Width nor Height change
Dock = Top/Bottom → Width change.
The above behaviors are correct and also the Microsoft input controls (tested with MS-NumericUpDown) show the same.
So, could you please elaborate on why you expect the control to show different behavior? Please let me know, if I am missing anything here.
Regards,
Ruchir
Posted 20 April 2020, 4:32 am EST - Updated 3 October 2022, 11:57 pm EST
Posted 28 April 2020, 3:06 pm EST
Hi, I see your image, you set only dock top, but if you set autosize=true, the inputpanel resized both width and height. like my image.
the red area is my form background, and gray area is inputpanel,
if I set docked top I need to fill the top with inputpanel, not a small area.
In your image you don’t set auto-size, you can see the height is not resized to right height value.
Posted 1 May 2020, 12:08 pm EST
Hello,
As I understand after setting Dock=Top and AutoSize =True for C1InputPanel, you want that the C1InputPanel should occupy/fill the complete top area, that is, the complete top area should be occupied with C1InputPanel’s gray color, right?
If I am correct in understanding your requirement, I would like to inform that upon setting the above two properties as required, the C1InputPanel fill the full top area, like shown in my previous response.
This time I am attaching a video of the complete steps and application, if I am misinterpreting anything do let me know.
Regards,
Ruchir
Dock_C1InputPanel.zip[img]https://gccontent.blob.core.windows.net/forum-uploads/file-47889d05-5e21-41ac-abd3-68b494a5ee4e.gif[/img]