Hi,

I'm trying to select a listbox entry by the code beneath, but I receive -1 as position and an empty string as entry.
Do I miss something?

Regards,
Xaver

ctx = uno.getComponentContext()
smgr = ctx.ServiceManager

type = 'ListBox'
ctrl = self.mb.smgr.createInstanceWithContext("com.sun.star.awt.UnoControl%s" % type,ctx) ctrl_model = self.mb.smgr.createInstanceWithContext("com.sun.star.awt.UnoControl%sModel" % type,ctx)
ctrl.setModel(ctrl_model)

ctrl.addItems(('a','b','c'),0)

ctrl.selectItemPos(1,True)
ctrl.selectItem('a',True)

--
To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

Reply via email to