Jump to content

GUICtrlCreateCombo, GUICtrlCreateEdit


Bert
 Share

Recommended Posts

here is a example script:

#include <GUIConstants.au3>

$Form1_1 = GUICreate("", 889, 403, 193, 110)
$Combo1 = GUICtrlCreateCombo("", 24, 72, 201, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL))
GUICtrlSetData($Combo1,"","")
$input1 = GUICtrlCreateInput("", 24, 40, 201, 21)
$edit1 = GUICtrlCreateEdit("", 248, 8, 625, 377)
$Button1 = GUICtrlCreateButton("Ok", 88, 352, 65, 33, 0)
$Button2 = GUICtrlCreateButton("Cancel", 168, 352, 57, 33, 0)
$Button3 = GUICtrlCreateButton("Add", 16, 352, 57, 33, 0)
$lable = GUICtrlCreateLabel("short name entry", 24, 8, 96, 17)
GUISetState(@SW_SHOW)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $nMsg = $Combo1
    EndSwitch
WEnd

I'm looking to :

type a string in $input1

type data in $edit1

click $button1

The data from $input1 gets added to $combo1

Anytime the choice from $combo1 is shown, the data in $edit1 will be shown also.

I'm having a brain freeze on trying to figure this out. Is it possible to get some direction from someone? I'm not sure I should use a array, how to save the data so it will show correctly, (tried the ini route, and the carriage return problem hits me up side the head) HELP!

Link to comment
Share on other sites

The ini way might work if you do a "conversion".

When you get the input content of your editbox, replace any CR with "@CR" and any LF with "@LF"(@CR and @LF guess can't be found in a normal content) then write it to an ini key.

When you read the ini key, you will have to replace back @CR and @LF then update the content of the editbox.

Can't think of anything else right now.

SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script

wannabe "Unbeatable" Tic-Tac-Toe

Paper-Scissor-Rock ... try to beat it anyway :)

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...