Sign in to follow this  
Followers 0
Markus

GUICtrlSetData Problem

7 posts in this topic

Hi!

I have a problem with the GUICtrlSetData function.

#include <GUIConstants.au3>

GUICreate("")
GUiSetState()
$id_combo=GUICtrlCreateCombo("",10,10,200,20)
GUICtrlSetData($id_combo,"hello")
GuiCtrlSetData($id_combo,"he")

While 1
WEnd

If you try it, you'll see, that theres only "hello" in the combo, because for AutoIt "he" seems to be the same as"hello" and so it just sets "hello" as default and doesnt adds "he" as entry(same results with words with same letters at the beginning). It would work if i would add "he" at start and then "hello" but in my newest script the user decides what is added in the combo and if he wants to add $id_variable2 and then $id_variable theres the same problem as with "he" after "hello". Is there any possibilitie to add "he" after "hello"?? Plz help


"It's easier to disintegrate an atom than a prejudice." (A.Einstein)---------------------------------------------------------------------------My C++ - tools:Tidy tool-->indents your c++ sourceCleanscript --> cleans autoit-code before compiling (co-author: peethebee)My tools:GUIBuilder-->build your window and get the source; german versionMy Games:OnlineGameCenter-->Online Chess and Connect4 with a rtf-chatSnake-->including a level editor to build your own levelsTetris-->the well known game, big funOther things:Tower of Hanoi-->perfect riddler with graphic output

Share this post


Link to post
Share on other sites



It works??? Not for me^^ FileGetVersion returns 3.1.0.15 I have same version like u, havent I? why my combo only has "hello" as entry then?


"It's easier to disintegrate an atom than a prejudice." (A.Einstein)---------------------------------------------------------------------------My C++ - tools:Tidy tool-->indents your c++ sourceCleanscript --> cleans autoit-code before compiling (co-author: peethebee)My tools:GUIBuilder-->build your window and get the source; german versionMy Games:OnlineGameCenter-->Online Chess and Connect4 with a rtf-chatSnake-->including a level editor to build your own levelsTetris-->the well known game, big funOther things:Tower of Hanoi-->perfect riddler with graphic output

Share this post


Link to post
Share on other sites

Ah i need that 3.1.1++ Beta? Never updated my Autoit^^ Good I think that was the mistake


"It's easier to disintegrate an atom than a prejudice." (A.Einstein)---------------------------------------------------------------------------My C++ - tools:Tidy tool-->indents your c++ sourceCleanscript --> cleans autoit-code before compiling (co-author: peethebee)My tools:GUIBuilder-->build your window and get the source; german versionMy Games:OnlineGameCenter-->Online Chess and Connect4 with a rtf-chatSnake-->including a level editor to build your own levelsTetris-->the well known game, big funOther things:Tower of Hanoi-->perfect riddler with graphic output

Share this post


Link to post
Share on other sites

you are not on XP right?

try:

#include <GUIConstants.au3>

GUICreate("")
GUiSetState()
$id_combo=GUICtrlCreateCombo("",10,10,200,80)
GUICtrlSetData($id_combo,"hello")
GuiCtrlSetData($id_combo,"he")

While 1
   sleep(10)
WEnd

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

I am. But now all works fine, i just updated Autoit with the 3.1.1++Beta Version, thx for help.


"It's easier to disintegrate an atom than a prejudice." (A.Einstein)---------------------------------------------------------------------------My C++ - tools:Tidy tool-->indents your c++ sourceCleanscript --> cleans autoit-code before compiling (co-author: peethebee)My tools:GUIBuilder-->build your window and get the source; german versionMy Games:OnlineGameCenter-->Online Chess and Connect4 with a rtf-chatSnake-->including a level editor to build your own levelsTetris-->the well known game, big funOther things:Tower of Hanoi-->perfect riddler with graphic output

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  
Followers 0