3 messages in com.googlegroups.google-desktop-developerRe: onChange for Dropdown listbox in ...
FromSent OnAttachments
Michael18 Apr 2007 04:39 
James [GD Team]20 Apr 2007 13:56 
Michael21 Apr 2007 03:33 
Subject:Re: onChange for Dropdown listbox in optionsmenu
From:Michael (fj4s@temporaryinbox.com)
Date:04/21/2007 03:33:16 AM
List:com.googlegroups.google-desktop-developer

Hey,

I'm happy now! The problem was, I called function named not anonymous, anyway it works!

One more question, can be drop-down list created in view? In documentation I found only how to create list, but nothing about drop- down. Would be nice to have something like that, so user don't need to open options menu, if he wont see the gadget with another option quickly

Thanks a lot again!

On Apr 20, 10:56 pm, "James [GD Team]" <j.@google.com> wrote:

Hello Michael,

Yes, the onchange event is called "onChanged". Here's an example:

var listItems = new Array("item 1", "item 2", "item 3"); var curSelectedItem = "item 2"; var list = wnd.AddControl(gddWndCtrlClassList, gddWndCtrlTypeListDrop,"list", listItems, 10, 35, 280, 2000); list.value = curSelectedItem;

list.onChanged = function (window, control) { alert('Changed'); };

"window" is a reference to the window object, which has the methods "AddControl" and "GetControl". "control" is a reference to the control that triggered the event, in this case the dropdown listbox.

Cheers! James

On Apr 18, 4:40 am, Michael <fj4s@temporaryinbox.com> wrote:

Hey!

I use an dropdown listbox in options dialog of my gadget (gddWndCtrlTypeListDrop) and try to hire an function after an option of listbox is changed. Is there an onChange event for this? I would be very thanksfull for an example. I've tried a lot, but nothing has worked for me.

Regards!