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

Insert items in the same line in a Listbox

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


Joined: 10 Apr 2006
Posts: 23

PostPosted: Tue Oct 10, 2006 6:31 am    Post subject: Insert items in the same line in a Listbox Reply with quote

I want to insert in a Listbox three fields in the same line, like this (but without dotted lines):

tab( )="car","bicycle","motorbike"
colour()="blue","orange","black"
owner()="Peter","Elisabeth","Jack"


car..........................blue .......................... Peter
bicycle...................orange...................... Elisabeth
motorbike..............black......................... Jack

I want to line up the items of the same table, so I donīt like this:

car blue Peter
bicycle orange Elisabeth
motorbike black Jack

How can I do it? Is there any listbox method that allows me do it?
Back to top
View user's profile Send private message
ms777
Super User
Super User


Joined: 07 Feb 2004
Posts: 1355

PostPosted: Tue Oct 10, 2006 6:44 am    Post subject: Reply with quote

AFAIK no. Use a monospaced font (e.g. Courier), and insert blanks.
Back to top
View user's profile Send private message
isa_ga23
General User
General User


Joined: 10 Apr 2006
Posts: 23

PostPosted: Tue Oct 10, 2006 6:50 am    Post subject: Reply with quote

Sorry, I don't explain well. I want to have three colums in the same Listbox.

Is it possible??
Back to top
View user's profile Send private message
isa_ga23
General User
General User


Joined: 10 Apr 2006
Posts: 23

PostPosted: Tue Oct 10, 2006 6:59 am    Post subject: Reply with quote

I can do it with this code:

cadena(0)=tab(0)+blanks+colour(0)+blanks+owner(0)
cadena(1)=tab(1)+blanks+colour(1)+blanks+owner(1)
cadena(2)=tab(2)+blanks+colour(2)+blanks+owner(2)

olistbox = oDialog.getControl("ListBox")
olistbox.additem(cad(0),0)
olistbox.additem(cad(1),1)
olistbox.additem(cad(2),2)

But Is it the only way? Is there any listbox method that allows me do it?
Back to top
View user's profile Send private message
ms777
Super User
Super User


Joined: 07 Feb 2004
Posts: 1355

PostPosted: Tue Oct 10, 2006 8:03 am    Post subject: Reply with quote

isa_ga23 wrote:
... But Is it the only way? Is there any listbox method that allows me do it?

I think I understood you correctly. And I still believe that the ListBox has no such method. Maybe there are other controls than a listbox doing this ?
Back to top
View user's profile Send private message
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