EDP Part 2
EDP Part 2
EDP Part 2
Kitaw A.
Controls: MaskedTextBox
A MaskedTextBox control provides a validation mechanism for user input
on a TextBox
For example, if you want a TextBox to accept a phone number in
+2519******** format, you can set masking in the MaskedTextBox
Properties
Mask: masks the default text property
The mask can be set using Input Mask dialog where we can select a predefined mask
Controls: MaskedTextBox
Controls: MaskedTextBox
Here is a list and description of masking characters.
0 – Digit, required. Value between 0 and 9.
9 – Digit or space, optional.
L - Letter, required. Restricts input to the ASCII letters a-z and A-Z.
? - Letter, optional. Restricts input to the ASCII letters a-z and A-Z.
& - Character, required.
C - Character, optional.
A - Alphanumeric, required.
a - Alphanumeric, optional.
\ - Escape. Escapes a mask character, turning it into a literal. "\\" is the escape sequence
for a backslash.
All non-mask elements will appear as themselves within MaskedTextBox and cannot be
moved or deleted by the user.
Controls: MaskedTextBox
For example, if you want a TextBox to accept a phonenumber in
+2519******** format, you can set masking in the MaskedTextBox named
mTextPhone as
mTextPhone.Mask=“+251\\900000000”;
Controls: GroupBoxes and Panels
GroupBoxes and Panels are typically used to group several controls of
similar functionality or several controls that are related in a GUI
All of the controls in a GroupBox or Panel move together when the
GroupBox or Panel is moved
Furthermore, GroupBoxes and Panels can also be used to show or hide a set
of controls at once
When you modify a container’s Visible property, it toggles the visibility of
all the controls within it
The primary difference between these two controls is that GroupBoxes can
display a caption (i.e., text) and do not include scrollbars, whereas Panels
can include scrollbars and do not include a caption.
Controls: GroupBoxes and Panels
GroupBox properties
Text: Specifies the caption text displayed at the top of the GroupBox.
Panel properties
AutoScroll: Indicates whether scrollbars appear when the Panel is too small
to display all of its controls
The default value is false.
Controls: ToolTips
Tool Tip:
The helpful text that appears when the mouse hovers over an item in a GUI
Common Properties
AutoPopDelay: The amount of time (in milliseconds) that the tool tip appears while
the mouse is over a control.
IsBalloon: A Boolean property, determines whether the tool tip will take on a balloon
form
Its default value is false