.NETGURU
Units of Width
Messages   Related Types
This message was discovered on ASPFriends.com 'aspng' list.
Responses highlighted in red are from those people who are likely to be able to contribute good, authoratitive information to this discussion. They include Microsoft employees, MVP's and others who IMHO contribute well to these kinds of discussions.

Dan Hurwitz (VIP)
Many of the server controls have a Width property. Looking at the MSDN
Library documentation that comes with the beta (e.g. WebControl.Width
Property), it is a variable of type Unit. Delving deeper, the UnitMembers
are Parse, Percentage, Pixel, and Point. However, I can not get anything to
work other than an integer value, as in:
            cText.Width=75;
where cText is a TableCell, in this case.

My questions:
1. What unit is 75 in this example? The only thing I am sure of is that it
is not Percentage.
2. How do I specify Percentage? I have tried everything I can think of,
but all result in a compiler error of some sort.

Thanks.

--d

Reply to this message...
 
    
Mark Howland
Try using the following:

cText.Width = Unit.Percentage(75);
or
Unit.Pixel(75);
etc.

----- Original Message -----
From: "Dan Hurwitz" <Click here to reveal e-mail address>
To: "aspng" <Click here to reveal e-mail address>
Sent: Tuesday, May 01, 2001 2:05 PM
Subject: [aspng] Units of Width

[Original message clipped]

Reply to this message...
 
    
Dan Hurwitz (VIP)
Thanks for your reply. Neither one of these causes a compiler error.
However...

Unit.Pixel(75) seems to work and confirms that
    cText.Width=75;
actually setting a pixel width.

Unit.Percentage(75) gives the same full screen width no matter what value I
put in there.

Under any circumstances I have set
    cText.Wrap=false;
yet the text still wraps even when I have set the column width to be
something very narrow.

Might it matter if the header column does not have the width property set?

Thanks.

--d

-----Original Message-----
From: Mark Howland [mailto:Click here to reveal e-mail address]
Sent: Tuesday, May 01, 2001 7:54 PM
To: aspng
Subject: [aspng] Re: Units of Width

Try using the following:

cText.Width = Unit.Percentage(75);
or
Unit.Pixel(75);
etc.

----- Original Message -----
From: "Dan Hurwitz" <Click here to reveal e-mail address>
To: "aspng" <Click here to reveal e-mail address>
Sent: Tuesday, May 01, 2001 2:05 PM
Subject: [aspng] Units of Width

[Original message clipped]

| [aspng] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/aspngcurious.asp = JOIN/QUIT
| http://www.asplists.com/search = SEARCH Archives

Reply to this message...
 
 
System.Web.UI.WebControls.TableCell
System.Web.UI.WebControls.Unit
System.Web.UI.WebControls.WebControl




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification