|
-
Feb 7th, 2007, 12:31 PM
#1
Thread Starter
Addicted Member
-
Feb 7th, 2007, 12:37 PM
#2
Re: Form Size According to Controls in it...
Please mark you thread resolved using the Thread Tools as shown
-
Feb 7th, 2007, 01:26 PM
#3
Thread Starter
Addicted Member
Re: Form Size According to Controls in it...
excellent coding
but that is not my problem
see that extra blank at the right hand side.. i need to remove that..
as i have kept the resize = false in the form so it wont resize so that code will not work which is in that link
i need to fix that size.. in design mode it looks ok.. there is no gap after controls on the right hand side
-
Feb 7th, 2007, 02:16 PM
#4
Addicted Member
Re: Form Size According to Controls in it...
compute where the right edge of a control would be (control.left * control.width)
If this is the righmost one you have found so far, remember it for later.
Loop through this for all controls on your form.
When you are done looping, set the form.width to the righmost value you found when you did your looping.
-
Feb 7th, 2007, 09:38 PM
#5
Re: Form Size According to Controls in it...
This is an odd question. If you don't want your form to be resizing then disable it. Set the borderstyle to 1 or Fixed Single at design time. It seems that you dont want to mess with the controls inside, all you wanted was to keep the form as is during design and runtime.
-
Feb 8th, 2007, 01:39 AM
#6
Thread Starter
Addicted Member
Re: Form Size According to Controls in it...
see.. i think i did not get my point right
look at the pic.. u see that extra space on right hand side.. it comes during runtime.. but not at design time..
how do i remove that extra width which is showing on the right hand side...
-
Feb 8th, 2007, 02:04 AM
#7
Re: Form Size According to Controls in it...
I see you don't get my point either. Have you tried my suggestion?
Set your borderstyle to Fixed Single. Because there's no way it'll change the size unless the windowstate is maximized at design time.
-
Feb 8th, 2007, 02:30 AM
#8
Thread Starter
Addicted Member
Re: Form Size According to Controls in it...
yep
working.. thanks zynder
repped and thread resolved
-
Feb 8th, 2007, 03:23 AM
#9
Re: [RESOLVED] Form Size According to Controls in it...
No probs mate!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|