Welcome Guest ( Login | Register )



All times are UTC - 7 hours [ DST ]



Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: using System.Drawing.COlor for hex color values
PostPosted: Mon Dec 14, 2015 3:05 pm 

Joined: Mon Dec 14, 2015 2:27 pm
Posts: 2

Offline
Im tring to set the Fill color of a button in a script, and in the page script I added:

Code:
System.Drawing.Color projectBlue = System.Drawing.ColorTranslator.FromHtml("#2D6BB7");

   void myButton_Click(System.Object sender, System.EventArgs e)
      {
         myButton.Fill = Color.projectBlue;
      }


I get errors about the type of namespace name 'ColorTranslator' does not exist in the namespce 'System.Drawing'. What is the issue here? Is there an easier way to chnage the background color of a button when pressed, or at least set some latching state?


 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 7 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: