C programming from problem analysis to program design

This preview shows page 13 - 20 out of 27 pages.

C# Programming: From Problem Analysis to Program Design 13 RadioButton Objects Appear as small circles Give users a choice between two or more options Not appropriate to select more than one RadioButton object (from a group) Group RadioButton objects by placing them on a Panel or GroupBox control Setting the Text property for the GroupBox adds a labeled heading over the group
Image of page 13

Subscribe to view the full document.

C# Programming: From Problem Analysis to Program Design 14 GroupBox Objects GroupBox provides an identifiable group for controls – gives you a heading Objects may be grouped together for visual appearance Can move or set properties that impact the entire group GroupBox control should be placed on the form before you add objects GroupBox control adds functionality to RadioButton objects Allow only one selection
Image of page 14
C# Programming: From Problem Analysis to Program Design 15 MenuStrip Controls Offers advantage of taking up minimal space Drag and drop MenuStrip object from toolbox to your form Icon representing MenuStrip placed in Component Tray Select MenuStrip object to set its properties To add the text for a menu option, select the MenuStrip icon and then click in the upper-left corner of the form
Image of page 15

Subscribe to view the full document.

C# Programming: From Problem Analysis to Program Design 16 MenuStrip Control Objects Figure 10-10 Creating a shortcut for a menu item
Image of page 16
C# Programming: From Problem Analysis to Program Design 17 Adding Predefined Standard Windows Dialog Boxes Included as part of .NET Dialog boxes that look like standard Windows dialog boxes File Open, File Save, File Print, and File Print Preview Format Font Format Color dialogs
Image of page 17

Subscribe to view the full document.

Adding Predefined Standard Windows Dialog Boxes C# Programming: From Problem Analysis to Program Design 18 Figure 10-13 Adding dialog controls to menu options
Image of page 18
C# Programming: From Problem Analysis to Program Design 19 Adding Predefined Standard Windows Dialog Boxes – Font private void menuFont_Click ( object sender, System.EventArgs e) { fontDialog1.Font = lblOutput.Font; if (fontDialog1.ShowDialog( ) != DialogResult.Cancel ) { lblOutput.Font = fontDialog1.Font ; } } Figure 10-15 Font dialog box menu option
Image of page 19

Subscribe to view the full document.

Image of page 20
  • Winter '17
  • Qizhi Dai
  • Program design

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern