Jump to content
Sign in to follow this  

Combobox with multi columns

Recommended Posts



I've been searching this forum and the help file looking for a way to create a combobox with multi columns loaded from a text file.

My txt file data will look like this:

Id1 Full Name 1

Id2 Full Name 2

Id3 Full Name 3

The ids and full names will not be the same character length. When the combobox selection is made I will only need the Id to be inserted into an IE form and the full name is for reference only.

The examples I found in the help file and in this forum are single column only.

Thank you for your help,


Determined -- Devoted -- Delivered Make your mind up -- to seriously apply yourself -- accomplishing the desired results. **** A soft answer turneth away wrath: but grievous words stir up anger. Proverbs 15:1 KJB ****

Share this post

Link to post
Share on other sites

I guess I don't understand what you mean by "columns" in a combobox... Since comboboxes don't have columns?

This is about the closest thing I could fathom to what you want:

#include <GUIConstantsEx.au3>
Opt ("GuiOnEventMode", 1)

Global $combo

GUICreate("My GUI combo")

$combo = GUICtrlCreateCombo("Id1", 10, 10)
GUICtrlSetOnEvent (-1, "_ComboFunc")
GUICtrlSetData(-1, "Id2|Id3")


While 1
    Sleep (50)

Func _ComboFunc()
    Switch GUICtrlRead ($combo)
        Case "Id1"
            MsgBox (0, "Id1", "Full Name 1")
        Case "Id2"
            MsgBox (0, "Id2", "Full Name 2")
        Case "Id3"
            MsgBox (0, "Id3", "Full Name 3")

Edited by exodius

Share this post

Link to post
Share on other sites

Perhaps you mean to use a ListView control, vice a ComboBox?


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post

Link to post
Share on other sites

I think they say this, a listview vice a combobox, i was searching this too, but not 2 controls, a style for combobox that can able columns in the list of the combobox, like groups in listview (it's an user function)

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