Page 1 of 1

[Solved] Combobox edit field

Posted: Fri Oct 23, 2015 08:05
by gams
Hi
I was trying to make combobox fire an event everytime user types characters to the combobox edit field but none of the text events seem to trigger. I tried EventTextChanged, EventTextAccepted and EventTextSelectionChanged but no avail.

is the support for this missing?

Log:

Code: Select all

23/10/2015 10:58:31 (Std)    ********************************************************************************
23/10/2015 10:58:31 (Std)    * -------- START OF ESSENTIAL SECTION TO BE POSTED ON THE FORUM       -------- *
23/10/2015 10:58:31 (Std)    ********************************************************************************
23/10/2015 10:58:31 (Std)    ---- Version: 0.8.4 (Build: Aug  8 2015 Microsoft Windows MSVC++ Great Scott! 32 bit) ----
23/10/2015 10:58:31 (Std)    ---- Renderer module is: CEGUI::OpenGLRenderer - Official OpenGL based 2nd generation renderer module.  TextureTarget support enabled via FBO extension. ----
23/10/2015 10:58:31 (Std)    ---- XML Parser module is: CEGUI::TinyXMLParser - Official tinyXML based parser module for CEGUI ----
23/10/2015 10:58:31 (Std)    ---- Image Codec module is: SILLYImageCodec - Official SILLY based image codec ----
23/10/2015 10:58:31 (Std)    ---- Scripting module is: None ----
23/10/2015 10:58:31 (Std)    ********************************************************************************
23/10/2015 10:58:31 (Std)    * -------- END OF ESSENTIAL SECTION TO BE POSTED ON THE FORUM         -------- *
23/10/2015 10:58:31 (Std)    ********************************************************************************


thanks

Re: Combobox edit field

Posted: Fri Oct 23, 2015 13:03
by YaronCT
gams:

Code: Select all

combobox->getEditbox()->subscribeEvent( Editbox::EventTextChanged, Event::Subscriber(...) );


Make sure u subscribe to the event of the combobox's editbox, not the combobox itself!

Re: Combobox edit field

Posted: Fri Oct 23, 2015 13:58
by gams
yaronct wrote:gams:

Code: Select all

combobox->getEditbox()->subscribeEvent( Editbox::EventTextChanged, Event::Subscriber(...) );


Make sure u subscribe to the event of the combobox's editbox, not the combobox itself!


thanks that was the problem!