Jump to content



Photo

[Resolved] _GUICtrlComboBoxEx_ReplaceEditSel assist request


  • Please log in to reply
7 replies to this topic

#1 xeroTechnologiesLLC

xeroTechnologiesLLC

    Prodigy

  • Active Members
  • PipPipPip
  • 158 posts

Posted 17 April 2012 - 01:54 PM

I'm trying to dynamically update the text of the item that is selected in a comboboxEX after the user has changed the name of the item in an input box and hit the save button.

I was trying to use _GUICtrlComboBoxEx_ReplaceEditSel but it will not work with $CBS_DROPDOWN or $CBS_DROPDOWNLIST style which is the default.

If I use another style for the comboboxEX it looks like a list box...which doesn't work for what I am trying to do.

So what is the work around on this for what I am trying to do if any?

I am currently reviewing options with _GUICtrlComboBoxEx_SetItem, but not sure how I could implement this into what I'm trying to do.

Thoughts?

Edited by xeroTechnologiesLLC, 17 April 2012 - 03:16 PM.






#2 BrewManNH

BrewManNH

    באָבקעס מיט קודוצ׳ה

  • MVPs
  • 6,820 posts

Posted 17 April 2012 - 02:05 PM

Why are you using the ComboBoxEx instead of ComboBox?

How to ask questions the smart way!

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.

Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.

_FileGetProperty - Retrieve the properties of a file SciTE Toolbar - A toolbar demo for use with the SciTE editorGUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.

GUIToolTip UDF Demo - Demo script to show how to use the GUIToolTip UDF to create and use customized tooltips.

Posted Image


#3 xeroTechnologiesLLC

xeroTechnologiesLLC

    Prodigy

  • Active Members
  • PipPipPip
  • 158 posts

Posted 17 April 2012 - 02:11 PM

The data in the combo box is being filled in using an array from an .ini file.
I was unsuccessful in accomplishing the same thing with a regular combo box.
Apologies for not specifying that earlier.

#4 Zedna

Zedna

    AutoIt rulez!

  • MVPs
  • 8,315 posts

Posted 17 April 2012 - 02:12 PM

Post small reproducing script and we will fix it for you.

#5 Zedna

Zedna

    AutoIt rulez!

  • MVPs
  • 8,315 posts

Posted 17 April 2012 - 02:16 PM

The data in the combo box is being filled in using an array from an .ini file.
I was unsuccessful in accomplishing the same thing with a regular combo box.


From help

ComboBoxEx Controls are an extension of the combo box control that provides native support for item images.

So you should use ComboBox instead of ComboBoxEx

#6 xeroTechnologiesLLC

xeroTechnologiesLLC

    Prodigy

  • Active Members
  • PipPipPip
  • 158 posts

Posted 17 April 2012 - 02:31 PM

Such as the help file does quote that, that is absolutely not the case unless there is another method to reading an ini into a base combo box.
I have attempted it 3 different ways in a simple gui form with a combo box and was unsuccessful in filling the combo box with the array information from the .ini file.

Unless yall have a method designed I could use.

#7 Zedna

Zedna

    AutoIt rulez!

  • MVPs
  • 8,315 posts

Posted 17 April 2012 - 02:51 PM

As as said: Post small reproducing script and we will fix it for you.

#8 xeroTechnologiesLLC

xeroTechnologiesLLC

    Prodigy

  • Active Members
  • PipPipPip
  • 158 posts

Posted 17 April 2012 - 03:16 PM

Apologies for the time waste.

The below works for what I need it to do which is essentially change the text in the combo box to the new name of the item.
ControlSetText($optionsGUI, "", "[CLASS:ComboBoxEx32; INSTANCE:2]", $macroName)

Edited by xeroTechnologiesLLC, 17 April 2012 - 03:29 PM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users