rdgerken
Technical User
- Jul 8, 2002
- 108
Hi all,
I have been creating a lot of user controls for one of my applications, and I have really been bogged down with programming the resize event for the control. Basically I have to calculate the location and size for all the objects on my user control and set them accordingly on the controls resize event. It works great, but it is a real pain to calculate all this stuff out, and not to mention you have to do some math to figure out if the scaling factors have rounding errors that will throw the location and/or size off by a pixel. Does anyone have any advice or tips on how to make the process of creating resizable user controls? I thought about writing a program that would take all the locations and sizes at design time, and generate the code necessary for the resize event - but before I'd venture out and spend time doing that, I was wondering if anyone had an easier way, or perhaps there is something out there that does this already. Thanks!
I have been creating a lot of user controls for one of my applications, and I have really been bogged down with programming the resize event for the control. Basically I have to calculate the location and size for all the objects on my user control and set them accordingly on the controls resize event. It works great, but it is a real pain to calculate all this stuff out, and not to mention you have to do some math to figure out if the scaling factors have rounding errors that will throw the location and/or size off by a pixel. Does anyone have any advice or tips on how to make the process of creating resizable user controls? I thought about writing a program that would take all the locations and sizes at design time, and generate the code necessary for the resize event - but before I'd venture out and spend time doing that, I was wondering if anyone had an easier way, or perhaps there is something out there that does this already. Thanks!