Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / March 2005

Tip: Looking for answers? Try searching our database.

getting handles from radio buttons

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
AK - 30 Mar 2005 03:37 GMT
I've got a Windows Forms Application project where I'm using 2 radial buttons.
I want to poll whether the radial button has been pressed or not. Here's one
way I think it could work, using the Checked property :

bool r1=System::Windows::Forms::RadioButton::get_Checked;

but how do I specify that I'm looking for the Checked property of
radiobutton1 ??
I intend to use r1 as a variable defined in the function created by the
click event handler of radial buttons 1 & 2. Can I define r1 outside this
function ?

Thanks for the help,
AK
Tim Robinson - 30 Mar 2005 23:50 GMT
> bool r1=System::Windows::Forms::RadioButton::get_Checked;
>
> but how do I specify that I'm looking for the Checked property of
> radiobutton1 ??

You use:
bool r1 = radiobutton1->Checked;

Can I assume that radiobutton1 is a class member variable? Was it defined by
the form designer?

> I intend to use r1 as a variable defined in the function created by
> the
> click event handler of radial buttons 1 & 2. Can I define r1 outside
> this function ?

Sure, make it a class member variable. But then again, radiobutton1->Checked
is accessible anywhere within the class, so why bother?

Signature

Tim Robinson
MVP, Windows SDK


Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.