Chapter 24 Accessibility 1229 111 // tell user (Web hosting bandwidth)
Chapter 24 Accessibility 1229 111 // tell user over which control mouse is 112 private void controls_MouseHover( 113 object sender, System.EventArgs e ) 114 { 115 // if mouse is over Label, tell user to enter information 116 if ( sender.GetType() == nameLabel.GetType() ) 117 { 118 Label temporary = ( Label) sender; 119 speaker.Speak( “Please enter your ” + temporary.Text + 120 ” in the textbox to the right” ); 121 } 122 123 // if mouse is over TextBox, tell user what 124 // information was entered 125 else if ( sender.GetType() == nameTextBox.GetType() ) 126 { 127 TextBox temporary = ( TextBox ) sender; 128 speaker.Speak( “You have entered ” + 129 ( temporary.Text == “” ? “nothing” : 130 temporary.Text ) + ” in the ” + temporary.Name ); 131 } 132 133 // otherwise, user is over Button, so tell user to click 134 // it to submit information 135 else 136 speaker.Speak( 137 “Click on this button to submit your information” ); 138 139 } // end method controls_MouseHover 140 141 // thank user for information submission 142 private void submitButton_Click( 143 object sender, System.EventArgs e ) 144 { 145 speaker.Speak( 146 “Thank you, your information has been submitted.” ); 147 148 Application.Exit(); 149 } 150 151 } // end class TextToSpeech Fig. 24.13 Fig. 24.1FiFig. 24.13g. 24.13 Fig. 24.13 Application with accessibility features. (Part 4 of 4.) Method controls_MouseHover determines which type of control the mouse is hovering over and generates the appropriate audio. Line 116 determines whether the type
Please visit Domain Name Hosting services for high quality webhost to host and run your jsp applications.