Jump to content


Some help with C#


3 replies to this topic

#1 Mbob61

    I may or may not be iron man!

  • Project Team
  • 3,068 posts
  • Projects: European Conflict

Posted 15 October 2010 - 23:41

Does anyone with any C# knowledge know if its possible to remove the form title via check boxes.

I can make a check remove the title using this.Text = ""; line but I can't work out how to link this to the .Checked code which lets it change every time you change its state.
An example of this would be programmerNameLabel.Visible = hideProgrammerCheckBox.Checked;

Mike
Thanks to Pav3d for the awesome sigs
Posted Image
Posted Image

#2 Raven

    Ready to rumble

  • Member Test
  • 853 posts

Posted 16 October 2010 - 14:43

If i understand properly, you want to change the window title every time the user changes the checked state of the checkbox? If that is the case, there is an event called "CheckedChanged" or something with a similar name. You can catch that event and change the window title.

#3 CodeCat

    It's a trap!

  • Gold Member
  • 6,111 posts

Posted 16 October 2010 - 15:05

Yep, that's the general practice in any event-driven library. Attach an event handler to the event in question, then change the window title in the event handler.

Edited by CodeCat, 16 October 2010 - 15:06.

CodeCat

Posted Image
Posted Image

Go dtiomsaítear do chód gan earráidí, is go gcríochnaítear do chláir go réidh. -Old Irish proverb

#4 Mbob61

    I may or may not be iron man!

  • Project Team
  • 3,068 posts
  • Projects: European Conflict

Posted 16 October 2010 - 18:37

Cheers guys 8|
I will see what i can do 8|

Mike
Thanks to Pav3d for the awesome sigs
Posted Image
Posted Image





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users