Hi,I'm in the process of converting a very large app using the infragistics controls. We currently have a subset of the forms to test with and i'm having a few issues with making it look how we want.Basicaly the GroupBox control doesn't have a padding property so if you dock it inside a container you can't set its padding to make it look nice. Also the same with the ultrapanel. The standard winforms groupbox has padding.. Any ideas how to achieve this? We tried encapsulating the control inside a usercontrol in order to get the padding from the usercontrol, but we didnt get very far. I don't know if we can inherit from these controls and do something with a draw filter or something?RegardsChris
The property you're looking for on the WinGroupBox is called ContentPadding. Here's a link to it's documentation. Although, you'll probably not need it, it's straight forward.
http://help.infragistics.com/NetAdvantage/WinForms/2010.3/CLR2.0/?page=Infragistics2.Win.Misc.v10.3~Infragistics.Win.Misc.UltraGroupBox~ContentPadding.html
Quick edit...for your WinPanel, you can use the command as shown below:
ultraPanel1.ClientArea.Padding = new Padding(5, 5, 5, 5);
Hi,Nah, contentpadding does the inside of the control. Padding does the outside of the control. Imagine a groupbox docked inside a form, or if you have a form with a splitter on and you need to dock the groupbox.. the groupbox is flush with the form. We need to pad that.. Yes i could put all the groupboxes inside a panel, but what a frig.I'd rather encapsulate my own version of the control that mimics the infragistcs group box but has a padding option.RegardsChris
AHAHa no worries.. I did try that also. the form padding doesn't work. Not sure why. We have a baseform we inherit from which has the formmanager on it. Setting the padding on that form does nothing, and setting the padding on the derived form automaticaly sets it back to 0 again.RegardsChris
WinFormManager uses a WinPanel, Panel, or no container. You'll want to set the padding property on the panel it's using. For example if your form is called Form1 and your WinFormManager used a WinPanel, you'd set the padding by:
Form1_Fill_Panel.ClientArea.Padding = new Padding(5);
Hi,Our base form doesn't have a panel on it. This is because of the way we are migrating the code from VB6 to .net, it was easier not to have the panel on the base form. Would be nice to get this working without having to add a panel to the base form and then go and resite all the controls on the derived form.RegardsChris
Hi again,right fixed alot of issues by adding a panel to my base form and resiting all the controls.. things seem to be working alot better now, and i can pad off the form. Also resizing is SOOOOOOO much smoother.. would be nice to see padding on the panel and groupbox also, but as you say this is the work around.. thanks for the helpRegardsChris
Hi Chris,
Do you require any further assistance, or do you find the workaround you are using to be acceptable?Please let me know if you have any questions.