TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Jagg
NA
9
0
ComboBox refresh problem (for custom items)
Jul 5 2007 12:49 AM
I have a problem that is bifold:
Part 1: I have an MDI parent with numerous mdi children, these are created on startup and only destroyed when the application is shut down. The rest of the time they are just hidden/shown. However, when I hide a form (either by frm.Hide() or frm.Visible = false) and show it at a later time, its position resets. Is this common behavior? Should I hold position manually and set it on a show event? This seems a bit like overkill...
Part2: I have a custom Class that implements a ToString() operator, I use this class as items in a ComboBox, the ToString() operator enters the text nicely in the ComboBox EXCEPT when I add items at runtime, which is exactly what I need. Calling cmb.Refresh() does not refresh the items, the only thing that does the job is if I hide the entire form and then show it again, which is pretty dirty (I dont want to do that every time I add an item to the ComboBox), and brings me back to part1.
Any ideas how to refresh the ComboBox, so that it correctly updates its contents?
Thank you,
Jagg
Reply
Answers (
3
)
Making a window unselectable
Problem with KeyDown event in UserControl