forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


List width question

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
DW
Contributor
Contributor


Joined: 21 Mar 2003
Posts: 175
Location: UK

PostPosted: Mon Apr 14, 2003 6:38 pm    Post subject: List width question Reply with quote

Is there a way to check how long a line is in a list and then move whats after that value to the next line?

I want to do this to stop it going going off screen or out of view with long list items.
Back to top
View user's profile Send private message
Aslan
Valued Contributor
Valued Contributor


Joined: 31 May 2001
Posts: 589
Location: Memphis, TN USA

PostPosted: Mon Apr 14, 2003 6:41 pm    Post subject: Reply with quote

Have you tried using the "WRAP" style on the list?
Back to top
View user's profile Send private message Send e-mail
DW
Contributor
Contributor


Joined: 21 Mar 2003
Posts: 175
Location: UK

PostPosted: Mon Apr 14, 2003 7:00 pm    Post subject: Reply with quote

Warp's not a valid style for lists.
Back to top
View user's profile Send private message
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2149
Location: A House

PostPosted: Mon Apr 14, 2003 7:50 pm    Post subject: Reply with quote

This is what I would suggest.

Decide what font you plan to use and what size the font is. Then fill a list
with at least one item with characters until it exceeds the width of the list
you plan to use. Count how many characters are within view. Don't
forget to take into account the scroll bar on the right.

Then what I would do, is grab that word wrap example I have in the
source code section of the main VDS World Site. Before loading your
list in the list element, I would then run it through the word wrap code.
Place the access texts down in the next line. Continue to do this for the
entire list, then load that into the list element.

Other things to consider, do you want to just make a new line below
the line you are working on, or do you want to insert the access text
into the next existing line? Also, using a fixed width font would be
better for this than a variable width.

-Garrett
Back to top
View user's profile Send private message
Aslan
Valued Contributor
Valued Contributor


Joined: 31 May 2001
Posts: 589
Location: Memphis, TN USA

PostPosted: Mon Apr 14, 2003 7:55 pm    Post subject: Reply with quote

Sorry,

put the list in an edit box with the multi and wrap styles
Back to top
View user's profile Send private message Send e-mail
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Mon Apr 14, 2003 8:23 pm    Post subject: Reply with quote

There is an API to make a horizontal scrollbar for a listbox... let me check
into this. Be right back.

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Mon Apr 14, 2003 8:33 pm    Post subject: Reply with quote

Is this what you are looking for? Smile

Code:
title TEST
   DIALOG CREATE,TEST,-1,0,213,215
   DIALOG ADD,BUTTON,BUTTON1,170,70,,,,,DEFAULT
   DIALOG ADD,LIST,LIST1,10,12
   DIALOG SHOW
:evloop
   wait event
   goto @event()
:BUTTON1BUTTON
   list add,list1,Vds Is cool
   list add,list1,Hello World
   list add,list1,Good Bye World
   %A = @sendmsg(@win(~LIST1),$0194,200,0)
   warn %A
   rem Makes a 200 pixel sized horizontal scroll bar on the listbox
   goto evloop
:CLOSE
   exit

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
DW
Contributor
Contributor


Joined: 21 Mar 2003
Posts: 175
Location: UK

PostPosted: Mon Apr 14, 2003 10:17 pm    Post subject: Reply with quote

Yes freezing fire there is. Thats what im using right now, I just dont like it to much that all.
Its a pain to scroll when the list keeps changing.
I will look at the wrapper you spoke of Garrett.
Also no worries Aslan everyone makes mistakes.

Thank you all.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
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
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group