Presentation is loading. Please wait.

Presentation is loading. Please wait.

Controls in C++/CLI (2) CheckBox RadioButton GroupBox and Panel.

Similar presentations


Presentation on theme: "Controls in C++/CLI (2) CheckBox RadioButton GroupBox and Panel."— Presentation transcript:

1 Controls in C++/CLI (2) CheckBox RadioButton GroupBox and Panel

2 Controls in C++/CLI (2) CheckBox (Property: Text, Checked, CheckState (checked/unchecked/indeterminate) ; Event: Clicked, CheckedChanged, CheckStateChanged) –Multiple choices RadioButton (Property: Text, Checked; Event: Clicked, CheckedChanged) –Single choice in one container

3 Example 1 Start from the last project TestCheck –Remove TextBox CheckBox Dialog Box: –Add three CheckBoxes for CS415, CS425, CS435; Names to be cbCS415, cbCS425, cbCS435 –Add variables for inputs, and constructor –Handle Click events to get input Form1: –Invoke dialog box –Get/use data

4 Example 2 Start from the last project TestCheck –Remove TextBox RadioButton: Dialog Box: –Add four RadioButtons for Freshman, Sophomore, Junior, and Senior; Names to be rbFreshman, rbSophomore, rbJunior, and rbSenior –Add variables for inputs, and constructor –Handle Click events to get input Form1: –Invoke dialog box –Get/use data

5 Controls in C++/CLI (2) GroupBox and Panel –Group RadioButtons, will allow multiple in a form -- each in one group –Panel does not have property Text, but it can scroll.

6 Example 3 Start from the Dialog example GroupBox: Dialog Box: –Add two GroupBoxes for “years in school” and “study habits”; change the Text And Name accordingly, e.g, Names to be gbYears and gbStudy; – Add RadioBottuns to each GroupBox: “years in school” to have Freshman, Sophomore, Junior, and Senior; and “study habits” to have night owl and early bird; change the Text And Name accordingly; –Add variables for inputs, and constructor –Handle Click events to get input Form1: –Invoke dialog box; Get/use data (more data and displays)

7 Example 4 Continue from Example 3 Panel: Dialog Box: –Add a Panel change Name accordingly; – Add a few RadioBottuns to Panel; change Name accordingly; –Set property AutoScroll to True; –Add variables for inputs, and constructor –Handle Click events to get input (depends) Form1: –Invoke dialog box; Get/use data (more data and displays)


Download ppt "Controls in C++/CLI (2) CheckBox RadioButton GroupBox and Panel."

Similar presentations


Ads by Google