Wrox Programmer Forums
|
ASP.NET 1.1 As of 10/6/2005, this forum is locked as part of the reorganization described here: http://p2p.wrox.com/topic.asp?TOPIC_ID=35394. No posts have been deleted. Open ongoing discussions from the last week have been moved to either ASP.NET 1.0 and 1.1 Beginners http://p2p.wrox.com/asp-net-1-0-1-1-basics-60/ or ASP.NET 1.0 and 1.1 Professional. http://p2p.wrox.com/forum.asp?FORUM_ID=50. See my sticky post inside for more.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.1 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 30th, 2004, 02:53 PM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 218
Thanks: 0
Thanked 0 Times in 0 Posts
Default Whitespace in ListItem

Ok, I'm going a little bananas here.

I want to add whitespace within a ListItem's text property.

I'm using code like:
Code:
myListItem.Text = stringvar1 & "   " & stringvar2
This renders only one space. I have substituted in "   " with the same result. I have also used vbTab to no effect.


Thank you in advance for your suggestions

- - - - - - - - - - - - - - - - - - - - - - -
In God we trust, everything else we test.
 
Old June 30th, 2004, 03:15 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Unfortunately, the display of whitespace is a limitation of HTML. My only suggestion would have been the  . But if that doesn't work... I'm not sure.
 
Old June 30th, 2004, 03:15 PM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 336
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alyeng2000
Default

Try to Mix space with an hidden character like Chr(32) + Chr(254)

Ahmed Ali
Software Developer
 
Old July 1st, 2004, 07:12 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 218
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Well, the whole idea behind the listbox is to display data rows for a reviewer to inspect.

There are potentially a lot of rows, so I wanted something scrollable. I guess I could use a disabled multi-line textbox maybe? Do you have any other ideas for such a display?

- - - - - - - - - - - - - - - - - - - - - - -
In God we trust, everything else we test.
 
Old July 1st, 2004, 07:43 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 218
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ok, this is odd...

A coworker suggested using the key combo Alt+255 to produce the spaces and then copying it. It works, but I can't identify the kind of space - that is, it's NOT Chr(32)!

I'm not sure I understand its origin, but I know it renders the way I want it. It functions like the text equivalent of a spacer gif. I can create a single one and make it morph into the sizes I require. Go figure.

- - - - - - - - - - - - - - - - - - - - - - -
In God we trust, everything else we test.
 
Old July 1st, 2004, 08:19 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

You could use a datalist/grid and put it into a scrollable div. This would give you a lot more design/layout control than a standard listbox.
 
Old July 1st, 2004, 11:37 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 218
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The scrollable div is an excellent idea - except for the data format I'm dealing with in this situation.

I gotta remember that combo of a scrollable div combined with a datalist/grid, though.

Thanks a bunch, Peter!

- - - - - - - - - - - - - - - - - - - - - - -
In God we trust, everything else we test.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Comparing ListItem objects Andrew.Berry ASP.NET 2.0 Professional 1 April 8th, 2008 12:25 PM
set tooltiptext on every listitem for Combo myself.panku ASP.NET 1.0 and 1.1 Professional 0 March 18th, 2008 08:57 AM
listitem alyeng2000 ASP.NET 1.0 and 1.1 Basics 2 January 3rd, 2004 10:13 AM
SelectedIndexChange uses ListItem value Randy76 VS.NET 2002/2003 3 September 11th, 2003 09:33 AM
ListView, ListItem problems/questions Tremmorkeep C# 0 July 17th, 2003 04:21 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.