Jump to content
Sign in to follow this  

ComboBox, listitem focus

Recommended Posts


Edited typos in the problem statement and a sample INI. Gene

In this timer GUI I have provision for multple users, each user may have many projects. They track their times for the projects per user. The users enter all user names and projects. On the window are two ComboBoxes, one for users and one for projects. I wish to "remember" from one session to the next the last user name and the last project. I'm currently "remembering" those items in a common INI file along with the complete list of users. And I'm able to make both ComboBoxes (CB) come up wth the two items in focus. I'm also "remembering" the projects and other individual settings in an INI file named for that user, mine would be gene.ini.

The problem is they're not the "real" listitems. When the downdelta of the names CB is clicked the "real" name and the rest of the listitems are shown with the unreal name. I call it an unreal name because while it is displayed, if you click the downdelta of the projects CB, there are no projects listed, if you reselect the same or a different name and then if you click the downdelta of the projects CB, whatevet projects are associated with that name appear.

What I would like to have happen is that on startup the last user and last project are displayed in focus in the CBs as now happens, and if the user CB is clicked I would like to see no duplications in the name list, further if the projects CB is clicked I would like to see the projects of that user in the list.

Here are sample contents of the common INI:






LastActivity=Reading 01


Here are sample contents of the user INI:









[Reading 01]

Trial00=Reading 01



[Reading 02]

Trial00=Reading 02




Some of this may be superflous and I'm positive it could be more elegant, but except for the things I complained about, it works. It's also my first GUI.

Suggestions please...


I edited most of this out of existence. I don't know that I changed anything specific, but at some point the default part of GUICtrlSetData ( controlID, data [, default] ) began working.

Edited by Gene

[font="Verdana"]Thanks for the response.Gene[/font]Yes, I know the punctuation is not right...

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this