Forum  Commercial Foru...  Commercial Foru...  Navigation Tab - can the text and icon be changed after it is drawn?
Previous Previous
 
Next Next
New Post 11/16/2010 11:28 AM
  palli
14415 posts
1st Level Poster




Re: Navigation Tab - can the text and icon be changed after it is drawn? 

Hi Shawn,

The Font.Size property is readonly, so you must use Me.ntNotification.font = new System.Drawing.Font(....), where you use a contrstructor that changes the size.

Palli

 


Páll Björnsson - Visual WebGui support team - Email: support@visualwebgui.com
 
New Post 11/16/2010 12:45 PM
  sramirez@dynacal.com
508 posts
1st Level Poster


Re: Navigation Tab - can the text and icon be changed after it is drawn? 

Thanks for the instruction, but I am new to the terms of .net.  What is a constructor?  Would you mind a very simple few lines of code to demonstrate?

Thanks, Shawn

 
New Post 11/16/2010 1:07 PM
  palli
14415 posts
1st Level Poster




Re: Navigation Tab - can the text and icon be changed after it is drawn? 

Hi Shawn,

No problem.

Constructors are the New methods in VB.NET, in C# the constructors are methods with the same name as the class.

Overloading is another term used for method in a class that has multiple declarations, thereby supporting various number of parameters. For constructors, this is also common. The constructor for the Font class is overloaded, and one of it's simplest overloads is the following syntax:

 

        Me.Label2.Font = New System.Drawing.Font("Tahoma", 10.0!)

The best way for you to remember or find out how it's used, is to use the designer and change the font on some control, then look at the designer generated code and see how the designer does it. In my opinion, the designer is the most underrated "tool" of learning how to code in .NET. I personally use it every time I'm not exactly sure of the syntax for some of the designer settings for controls.

Hope this helps,

Palli

 


Páll Björnsson - Visual WebGui support team - Email: support@visualwebgui.com
 
New Post 11/16/2010 4:41 PM
  sramirez@dynacal.com
508 posts
1st Level Poster


Re: Navigation Tab - can the text and icon be changed after it is drawn? 

 Thanks for the tip!

I got it working because of your tip.

        Me.ntNotifications.ForeColor = Color.Red

        Me.ntNotifications.Font = New System.Drawing.Font("Tahoma", 10.0!)

        Me.ntNotifications.Text = "Notifications (2)"

        Me.ntNotifications.ImageKey = "ImportantMail.gif"

Thanks, Shawn

 
New Post 11/17/2010 11:27 AM
  palli
14415 posts
1st Level Poster




Re: Navigation Tab - can the text and icon be changed after it is drawn? 

Hi Shawn,

Glad to be of help and thanks for confirming.

Palli

 


Páll Björnsson - Visual WebGui support team - Email: support@visualwebgui.com
 
Previous Previous
 
Next Next
  Forum  Commercial Foru...  Commercial Foru...  Navigation Tab - can the text and icon be changed after it is drawn?
.NET HTML5 Web, Cloud and Mobile application delivery | Sitemap | Terms of Use | Privacy Statement | Copyright © 2005-2012 Visual WebGui®       Visual WebGui weblog on ASP.NET Gizmox Blog Visual WebGui Group on LinkedIn Visual WebGui updates on Twitter Visual WebGui Page on Facebook Visual WebGui YouTube Channel Visual WebGui Platform News RSS