how to get events from combo box. I didnt find eget_comobox_

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Mr.Gluck
Posts: 82
Joined: Tue Aug 31, 2004 8:02 pm

how to get events from combo box. I didnt find eget_comobox_

Post by Mr.Gluck »

how>?
bal
Posts: 829
Joined: Fri Jun 18, 2004 5:19 pm
Location: Geluwe, Belgium

Post by bal »

Damned, read those tutorials. http://irrlicht.sourceforge.net/tut005.html if you couldn't find it.
General Tools List
General FAQ
System: AMD Barton 2600+, 512MB, 9600XT 256MB, WinXP + FC3
Dingsi
Posts: 6
Joined: Thu Sep 30, 2004 8:17 pm
Location: Hannover, Germany
Contact:

Post by Dingsi »

bal wrote:Damned, read those tutorials. http://irrlicht.sourceforge.net/tut005.html if you couldn't find it.
Look at the code.. it's not really the GUI-example, is it?
Something went wrong when the tuts were updated. ^^.
Mr.Gluck
Posts: 82
Joined: Tue Aug 31, 2004 8:02 pm

i read

Post by Mr.Gluck »

i read all tuts ;)


For first : movement example does not constain combobox

For second: in the mesh tut is only fake - no example how to control combobox.

For third: there is no EGET_COMBOBOX_CHANGED in .doc
Mr.Gluck
Posts: 82
Joined: Tue Aug 31, 2004 8:02 pm

.

Post by Mr.Gluck »

i tried to use case with the number(ID) of me combobox, but nothing good...
Mr.Gluck
Posts: 82
Joined: Tue Aug 31, 2004 8:02 pm

.

Post by Mr.Gluck »

and so i asked this on ather forum where people said that LISTBOX_CHANGED works with COMBOBOX events, but i tried and nothing again... it doesnt work!
so the question is where something like COMBOBOX_CHANGED or how to work with combo?
Harry_Mystic
Posts: 32
Joined: Sun Nov 23, 2003 10:23 pm

Post by Harry_Mystic »

Same problem here. It seems that comboBox does not send any events when clicked or I am doing something wrong.

In event function:

Code: Select all

if (event.EventType == EET_GUI_EVENT)
	{
		s32 id = event.GUIEvent.Caller->getID();
		printf("\nID: %d\n", id);
		switch(id)
		{
    case 106:
			if (event.GUIEvent.EventType == gui::EGET_LISTBOX_CHANGED)
			{
				selectedResolution = ((gui::IGUIListBox*)event.GUIEvent.Caller)->getSelected();
				printf("\nListbox changed %d\n", selectedResolution);
			}
			break;
    case 108:
			if (event.GUIEvent.EventType == gui::EGET_LISTBOX_CHANGED)
			{
				selectedCombo = ((gui::IGUIComboBox*)event.GUIEvent.Caller)->getSelected();
				printf("\nCombo changed %d\n", selectedCombo);
			}
			break;
...
106 is a ListBox and 108 is a ComboBox.

I can see the ID when I'am over the comboBox with the mouse (printf ID) but don't get the selected item when I change it. The printf in "case 108" doesn't work at all. Everything else, like my ListBox here, works fine and shows me the selected item.
Mr.Gluck
Posts: 82
Joined: Tue Aug 31, 2004 8:02 pm

...

Post by Mr.Gluck »

does anybody know what to do?
kraket

.

Post by kraket »

2 Harry_Mystic: had you solve this problem?
Harry_Mystic
Posts: 32
Joined: Sun Nov 23, 2003 10:23 pm

Re: .

Post by Harry_Mystic »

kraket wrote:2 Harry_Mystic: had you solve this problem?
No, sorry. Just tried some changes in my code but nothing happens.
Maybe someone more experienced can have a look at this.
Mr.Gluck
Posts: 82
Joined: Tue Aug 31, 2004 8:02 pm

.

Post by Mr.Gluck »

I think that engine has a problem with it.
bal
Posts: 829
Joined: Fri Jun 18, 2004 5:19 pm
Location: Geluwe, Belgium

Post by bal »

According the the source you should use EGET_BUTTON_CLICKED and EGET_LISTBOX_CHANGED ... Report if it works or not :).
General Tools List
General FAQ
System: AMD Barton 2600+, 512MB, 9600XT 256MB, WinXP + FC3
Mr.Gluck
Posts: 82
Joined: Tue Aug 31, 2004 8:02 pm

i saw

Post by Mr.Gluck »

IMHO, according to the source i saw, EGET_BUTTON_CLICKED is only for intrnal use, e.g. to draw combo. Then the main role is ListBox and in the proram i must catch the changing of ListBox. Ok, i tried to use:

case EGET_LISTBOX_CHANGED:
case EGET_BUTTON_CLICKED:

but nothing at all.

Does anybody have a working example. Please, send it to mr_gluck@mail.ru
Post Reply