OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Problem with on the fly generated ComboBox in Calc

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
_francois_
General User
General User


Joined: 24 Nov 2005
Posts: 35

PostPosted: Wed Sep 17, 2008 12:34 am    Post subject: Problem with on the fly generated ComboBox in Calc Reply with quote

Hi

I create a repport via OLE Automation using Powerbuilder
In that repport I have a dropdown combo which is created as follow

oCB = oDoc.createInstance("com.sun.star.form.component.ComboBox")
oControl = oDoc.createInstance("com.sun.star.drawing.ControlShape")

oCB.Dropdown = true
oCB.Enabled = true
oCB.MaxTextLen = 60
oCB.lineCount = 5
oCB.name = "cb" + g_dossier
oControl.setPosition(oPoint)
oControl.setSize(oSize)

// populating itemList //

oCB.StringItemList = itemList
oControl.setControl(oCB)
oPage.add(oControl)

The combobox is correctly displayed in the page but I cannot choose a value in the combobox
if I save and close my document then re-open it my combo works just fine

I know I could save/close/open in my script but Id like to know if I could avoid those steps

I tried .uno:refresh reload and stuff like that wut withtout any success so far

Thanks in advance
Cheers
Back to top
View user's profile Send private message
probe1
Moderator
Moderator


Joined: 18 Aug 2004
Posts: 2465
Location: Chonburi Thailand Asia

PostPosted: Mon Sep 29, 2008 1:50 am    Post subject: Reply with quote

Francois,


I have no problem creating and using the combobox (using your code) here (WinXP, OOo 2.3.1)

Which OOo version you have?
_________________
Cheers
Winfried
My Macros
DateTime2 extension: insert date, time or timestamp, formatted to your needs
Back to top
View user's profile Send private message Visit poster's website
_francois_
General User
General User


Joined: 24 Nov 2005
Posts: 35

PostPosted: Mon Sep 29, 2008 6:38 am    Post subject: Reply with quote

Sorry I forgot to mention the versions
Win XP Pro SP3
OOo 2.4.0 FR
Back to top
View user's profile Send private message
probe1
Moderator
Moderator


Joined: 18 Aug 2004
Posts: 2465
Location: Chonburi Thailand Asia

PostPosted: Tue Sep 30, 2008 1:07 am    Post subject: Reply with quote

mmmh, 2.4.0 was more buggy than 2.4.1

If you can wait another week: OOo 3.0 is around the corner. Otherwise I would recommend upgrading to 2.4.1

Good luck.
_________________
Cheers
Winfried
My Macros
DateTime2 extension: insert date, time or timestamp, formatted to your needs
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group