| View previous topic :: View next topic |
| Author |
Message |
DW Contributor

Joined: 21 Mar 2003 Posts: 175 Location: UK
|
Posted: Mon Apr 14, 2003 6:38 pm Post subject: List width question |
|
|
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 |
|
 |
Aslan Valued Contributor


Joined: 31 May 2001 Posts: 589 Location: Memphis, TN USA
|
Posted: Mon Apr 14, 2003 6:41 pm Post subject: |
|
|
| Have you tried using the "WRAP" style on the list? |
|
| Back to top |
|
 |
DW Contributor

Joined: 21 Mar 2003 Posts: 175 Location: UK
|
Posted: Mon Apr 14, 2003 7:00 pm Post subject: |
|
|
| Warp's not a valid style for lists. |
|
| Back to top |
|
 |
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Mon Apr 14, 2003 7:50 pm Post subject: |
|
|
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 |
|
 |
Aslan Valued Contributor


Joined: 31 May 2001 Posts: 589 Location: Memphis, TN USA
|
Posted: Mon Apr 14, 2003 7:55 pm Post subject: |
|
|
Sorry,
put the list in an edit box with the multi and wrap styles |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Mon Apr 14, 2003 8:23 pm Post subject: |
|
|
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 |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Mon Apr 14, 2003 8:33 pm Post subject: |
|
|
Is this what you are looking for?
| 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 |
|
 |
DW Contributor

Joined: 21 Mar 2003 Posts: 175 Location: UK
|
Posted: Mon Apr 14, 2003 10:17 pm Post subject: |
|
|
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 |
|
 |
|