Solved

Form Resize and control problems

Posted on 2004-10-09
2
204 Views
Last Modified: 2010-04-23
I have two resize issues I need help with. When I resize my form with the FormBorderStyle set to Sizable and have a ListBox Anchored Top, Bottom, Left and Right that is positioned even to the top edge of a StatusBar it causes the ListBox to jump the incriment of space for each line in the listbox when the form is resized with the mouse.  If it matters my ItemHeight is 18

I also need help when resizing the same form to keep the statusbar items moving properly with the resize.  The best example of this is Wordpad.exe in Windows; the items in the StatusBar move i.e. items on the left stay on the left and items on the right move right when the form is resized. As mine is now, the items on the left stay on the left and items on the right stay put without moving at all. I would like the items on the left to move left with the form when it is resized.  The StatusBar is Anchored Bottom, Left and Right.

Anyone have ideas on fixing the ListBox to not move so sporadically and the StatusBar items to move properly?
0
Comment
Question by:teamdad
2 Comments
 
LVL 2

Accepted Solution

by:
kouroshparsa earned 500 total points
ID: 12268911
Hi. As far as I know, StatusBar is not designed for such a purpose. If you use a toolBar at the bottom, it would look much similar and does what you want.
By the way I assume you add items in your code using addItem. If you don't then do it, or at least do something like item.parent=sBar
I'd used what I explained; I did not like it, because it disfigures your application a bit.

If you set "AutoScale" property of your window to true, it will display scrollBars for the user !
regards, kourosh
0
 

Author Comment

by:teamdad
ID: 12268955
I accept your answer but I tried the AutoScale and it didn't have any visible changes.  For now I am just locking my form so it's not resizable and I don't have to hunt and peck around for something that might work.  I do thank you for the advice though.  I know something like it is doable since MS has use of it in their programs.
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question