Jump to content

Misbehaving combo box control


Recommended Posts

So instead of posting the applicable code, I have attached the whole file instead.  I am running into an issue where, when the script first launches, $combo3 in $form1_1 is, by default, displaying one of the entries that is meant to be selected, while all the other combo boxes are, by default (and desired state), blank and require user interaction.  I THINK it might have to do with the new function I incorporated into the script, which allows for all of the encrypted user data stored in the "ini" file to be decrypted and exported to a txt file which would allow users to manually edit data that is stored in ini and displayed in GUI.  Once the user has edited the data to reflect info they want,  they select to import the data, which will rename the old ini file to a ".backini" file and recreate the ini from the txt file which the user edited.  the code which executes these steps is assigned to $button18 and $button26 respectively in $form1_1.  Any input is appreciated.  Also, the _selfDelete file is UDF that is needed to compile script.

_SelfDelete.au3

passw.au3

issue.png

Edited by MattHiggs
Link to comment
Share on other sites

Your script is very big. For my own security reasons i test only scripts i think to unerstood what they are doing. To understood if your script is no security risc for me i need to much time.

So please make a small runable small script which showing the missbehaving of combobox.

 

Link to comment
Share on other sites

  • Moderators

MattHiggs,

I see that you are setting the multiple items in $Combo3 one at a time using a loop (section lines 320-360). As explained in the Help file:

If the "data" corresponds to an already existing entry it is set as the default.

which may well be the explanation, as you do not set a default for the combo in the code itself.

I suggest running the code and checking exactly what values you are adding to the combo in question - if you find a duplicate then you have your answer.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

  • Moderators

MattHiggs,

I see you online - any joy with my suggestion?

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Sorry for late response.  I will give it a try, but my goal here is to be able to pull the information which will be the content of the combo boxes from a ini file.  Furthermore, I do the same "looping" method to set the content of all of the combo boxes in that particular window the exact same way using the same logic, so why is only the one acting up?  Is there a more standard way or "best practice" to assigning the values in a combo box dynamically?

Edited by MattHiggs
Link to comment
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
 Share

  • Recently Browsing   0 members

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