Jump to content

Content of Combobox is not cleared


 Share

Recommended Posts

Hi Guys,

I hope you can help me with this one...

I have created a wizard. In 2 of the pages of this wizard a Combobox is used. These are pages 3 and 5.

The content of the second combobox (on page 5) depends on the selection made in the first combobox.

So far no problem: the second combobox gets it's content as expected.

But when the 'Back' button on page 5 is clicked, and than on page 4 (just another page) the 'Next' button is clicked, the combobox on page 5 has more items than it is initialized with. Even though I set the variable used to be a hard coded string.

I worked around the problem by using GUICtrlSetData and an empty parameter (See line 275).

But still I would like to know what is causing the problem. So if you could have a look at it...

(I know I need to change the way of defining the string of the variable to set the combobox content. I think I'll try to read the items from the ini file and place them into an array. Just to made the procedure nicer and that less maintenance is needed in a later stage.)

Please find the script and it's ini file attached in zip file.

Thanks in advance!!!

Cheers,

Nico.

Country.zip

Link to comment
Share on other sites

Hi Zedna,

Thanks for replying.

I read the help file, but the text as such is not clear to me. Even after reading you comment, I had to read your quote from the Help file 10 times before I understood how the data part for a combobox works in AutoIt.

The difficulty is that no where is mentioned that "the default" is used and more content is added. Nor what this "the default" represents. Is "the default" the same as [, default]. If so than setting [,default] as "" (like I did in line 276), does not have effect.

It just doesn't work like:

A = 1

A = 2 Now A has the value 2 instead of 1.

But if A would be the content of a combobox the value of A would be 12.

It looks like I'm quite negative, but on the contrary I'm not. I see the problem I encountered as a learning point (not only for me, but also for others coming across the same problem and may be even for the developers of AutoIt).

Cheers,

Nico.

Link to comment
Share on other sites

  • 2 months later...

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...