FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Setting defaultForeColor in one RadioButton

 
Post new topic   Reply to topic     Forum Index -> DFL
View previous topic :: View next topic  
Author Message
jicman



Joined: 22 Dec 2004
Posts: 298
Location: Rochester, NY

PostPosted: Wed Sep 19, 2007 9:53 am    Post subject: Setting defaultForeColor in one RadioButton Reply with quote

Greetings.

I have this piece of code,

Code:
      foreach (char[] pc; ProgList)
      {
        if (pc == " ")
          continue;
        else
        {
          if (pc == "Enter a New Program Name")
          {
            with(SubProjRadio[pc] = new RadioButton)
            {
              bounds = Rect(6, pcY, 160, 13); // x, y, width and height within the GroupBox.
              text = pc; // Text displayed next to the selector thing.
              checked = false; //
              //set defaultForeColor() here to blue;
              parent = myGroup; // Set parent to the GroupBox.
            }
          }
          else
          {
            with(SubProjRadio[pc] = new RadioButton)
            {
              bounds = Rect(6, pcY, 160, 13); // x, y, width and height within the GroupBox.
              text = pc; // Text displayed next to the selector thing.
              checked = false; //
              parent = myGroup; // Set parent to the GroupBox.
            }
          }
          pcY += 18;
          lastpc = pc;
        }

      }


and I would like to change the font color of an specific RadioButton. I tried a few things, but I keep getting error messages. I went to the RadioButton help, but there was no fontcolor changing function there. Is this possible?

thanks,

jose
Back to top
View user's profile Send private message
Chris Miller



Joined: 27 Mar 2004
Posts: 514
Location: The Internet

PostPosted: Wed Sep 19, 2007 4:35 pm    Post subject: Re: Setting defaultForeColor in one RadioButton Reply with quote

It's the foreColor property, but having the XP visual styles on disables this property (it's just how windows is)

I've been thinking about having something allowing you to disable the visual styles on a per-control basis. Sound fair?
Back to top
View user's profile Send private message
jicman



Joined: 22 Dec 2004
Posts: 298
Location: Rochester, NY

PostPosted: Thu Sep 20, 2007 11:50 am    Post subject: Re: Setting defaultForeColor in one RadioButton Reply with quote

Chris Miller wrote:
It's the foreColor property, but having the XP visual styles on disables this property (it's just how windows is)

I've been thinking about having something allowing you to disable the visual styles on a per-control basis. Sound fair?


Sounds very fair, yes. Smile Thanks.

by the way, this works,

Code:
foreColor = Color(0,0,0xFF);


since I don't have the XP ugly look. Smile By the way, it would be nice to say, ie,

Color(blue),

instead of,

Color(0,0,0xFF);

Just a thought. Smile

thanks for the help.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> DFL All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group