Thanks!
That explains a lot. I will check that [email protected] mail list out right away.
Ian Laurenson <[EMAIL PROTECTED]> skrev den Sat, 26 Mar 2005 16:37:31 +1200:
On Sat, 2005-03-26 at 13:32, Johnny Andersson wrote: [snip]3. Use getDataArray() to copy every value to an array in one step.
4. Using addItems to copy the whole array directly to the combo box...[remainder snipped]
The issue is that getDataArray() returns an array of arrays to handle the two dimensions. So it looks more like: Kunder=Array(array("a"), array("b"), array("c")) which is why you get an error when using addItems.
So if the data were in a row you could do something like: Ctl.addItems(Kunder(0),0)
If they are in a column then a loop to either create a one dimensional array then addItems or addItem.
By the way you don't need to create a cursor. Range.getDataArray will work.
Well, I will remember that. I guess that's what happens when learning from examples.
Do you know it there is a way to do this without using a loop or do I just have to give that idea up? The point in my case is, that those 13 rows in my example might grow a lot so speed is kind of relevant, especially since I am using a slow P2 450 MHz PC (which was very quick in early 1999.... ;D )
I will ask this question at the other mail list too.
By the way, in case somebody wonders: Kund means Customer and Kunder means Customers.
The best list to ask this type of question is the [email protected] mail list. See: http://api.openoffice.org/servlets/ProjectMailingListList or the oooforums see: http://www.oooforum.org/forum/viewforum.phtml?f=9
Thanks! Johnny Sweden
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
