Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
|
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET 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 August 25th, 2004, 08:13 AM
Authorized User
 
Join Date: Aug 2004
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to humour
Default Set font for DataGrid text enabled = false


When the enabled property is set false (code below) I want to be able to set the font color. What attribute is available to do this? Is it possible?

Thx in Advance,

<asp:TextBox id="POLine" runat="server" Enabled="False" Font-Size="10px">
 
Old August 25th, 2004, 10:19 AM
Friend of Wrox
 
Join Date: Jul 2004
Posts: 623
Thanks: 0
Thanked 1 Time in 1 Post
Default

when you make the attribute false write the below code(in your codebehind)
Code:
TextBox1.ForeColor=System.Drawing.Color.Blue;
or
Code:
TextBox1.Style.Add("color","blue");
--------------------------------------------
Mehdi.:)
 
Old August 25th, 2004, 01:43 PM
Authorized User
 
Join Date: Aug 2004
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to humour
Default



The code works fine but not when the textbox's enabled property = FALSE.

What I need is a way to modify the font when the text box is disabled.
 
Old August 26th, 2004, 12:55 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 326
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to Santhi Send a message via MSN to Santhi
Default

In disabled mode of the textbox ,we can't change the font property of it.






Similar Threads
Thread Thread Starter Forum Replies Last Post
set font in text file! dpkbahuguna Beginning VB 6 2 August 23rd, 2007 07:08 AM
Set Printer Font savandavande VB.NET 2002/2003 Basics 0 October 7th, 2006 05:31 AM
how to get font ,color,font size of text in win32 satishsatao Visual C++ 0 April 5th, 2006 05:05 AM
set rpttext box visible false myth12345 VB How-To 0 March 4th, 2005 11:08 AM





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