What is a Dialog box - PowerPoint PPT Presentation

1 / 26
About This Presentation
Title:

What is a Dialog box

Description:

The use of a dialog box can be as simple as displaying a warning message or it ... The parent is responsible for updating the scroll-box position. ... – PowerPoint PPT presentation

Number of Views:309
Avg rating:3.0/5.0
Slides: 27
Provided by: signa7
Category:
Tags: box | dialog

less

Transcript and Presenter's Notes

Title: What is a Dialog box


1
What is a Dialog box?
  • A Dialog box is a window or form that contains
    other child windows or controls that have a
    specific appearances and pre-defined behaviors.
    In many cases the appearance and behaviors of
    these controls can be modified by a program to
    enhance the usability of the control.
  • The use of a dialog box can be as simple as
    displaying a warning message or it can be complex
    enough to represent an entire application. Its
    all up to the programmer.

2
Dialog Styles
  • There are currently two basic techniques you can
    use to render a dialog with Comet.
  • A popup dialog
  • Standalone
  • Usually modal
  • Best for simple message exchange but can also be
    used for complex user input.
  • A embedded dialog
  • Child of the view window
  • Always modeless
  • Best for complex forms with many fields.

3
Popup Dialog
  • A typical popup dialog contains a title bar, a
    system menu and user controls. It is modal in
    that the parent window (COSW or another dialog)
    is disabled and will remain so until the dialog
    is destroyed. The underlying screen may still be
    visible under the dialog.
  • A popup dialog can contain a complex set of
    controls or it can display a simple message.

4
Fitting it all in Tabbed Dialogs
  • Most applications manage far more data than can
    be displayed on the screen. For legacy Comet
    applications the solution to this problem is to
    break up the data into manageable groups and then
    display each group separately from the others.
    While this technique can also used in a windowed
    application, there are better ways to handle this
    problem.
  • A tabbed dialog is a dialog that contains a
    tab control that looks and behaves in a manner
    similar to a notebook or binder. The user simply
    clicks on a tab and the page associated with
    that tab is displayed in the display area of the
    tab control. The display area inside the tab
    window contains the fields that pertain to a
    group of related fields. In the past, all of the
    controls for every tab had to be individually
    show, hidden, and maintained based upon the tab
    that was clicked. This is no longer the case.

5
Tabbed Dialog Layout
  • A typical tabbed dialog will contain a tab
    control that will define the area that each page
    will be share. In addition, the dialog will
    contain other controls that are common to all of
    the pages the dialog will support.

6
Embedded Dialog
  • A embedded dialog appears to be integrated
    directly into the COSW view window. This
    technique can provide seamless transitions from a
    legacy Comet application to a windowed
    application. There are two ways to display a
    embedded dialog. The first is to size the COSW
    window to fit the dialog. Because the user will
    see the window size change this is the least
    attractive of the two. The second is to leave
    COSW as is and blend the dialog into the existing
    window (preferred). The only catch to this
    method is that the window must already be large
    enough to contain the entire dialog.

7
What kind of Controls does Comet Support?
  • The following controls are currently supported by
    Comet
  • Buttons including PushButtons, RadioButtons, and
    CheckBoxes.
  • Static Text
  • Edit
  • GroupBox
  • ListBox
  • ComboBox
  • ScrollBar
  • Spin
  • Progress
  • Tab
  • Picture
  • IPAddress
  • ListView
  • TreeView
  • DateTimePicker
  • MonthCalendar

8
PushButton Control
  • The PushButton control is a round-cornered
    rectangle containing text. The text is centered
    in the control. The control sends a message to
    its parent whenever the user chooses the control.

9
RadioButton Control
  • RadioButtons are used to select one of several
    options, usually within a dialog box. A radio
    button contains a small circle with text next to
    it. When selected, the circle has a smaller,
    filled circle inside it. Selecting one button in
    a set deselects the previously selected button,
    so only one of the options in the set is selected
    at a time.

10
CheckBox Control
  • The CheckBox control is a small rectangle (check
    box) that has the specified text displayed next
    to it (typically, to the right). When the user
    selects the control, the control highlights the
    rectangle and sends a message to its parent
    window.

11
StaticText Control
  • The StaticText control provides a convenient way
    to display text on dialog boxes and other
    windows. Static text controls often serve as
    labels for other controls.

12
GroupBox Control
  • The GroupBox control is a rectangle that groups
    other related controls together. The controls are
    grouped by drawing a border around them and
    displaying the given text in the upper-left
    corner.

13
Edit Control
  • The Edit control is a rectangular control window
    typically used in a dialog box to permit the user
    to enter and edit text by typing on the keyboard.

14
ListBox Control
  • The ListBox control is a rectangle containing a
    list of strings (such as filenames) from which
    the user can select. The ListBox can be
    restricted to one selection at a time or it can
    allow multiple selections.

15
ComboBox Control
  • The ComboBox control consists of either a static
    text box or an edit box combined with a list box.
    The list box can be displayed at all times or
    pulled down by the user. If the combo box
    contains a static text box, the text box always
    displays the selection (if any) in the list box
    portion of the combo box. If it uses an edit box,
    the user can type in the desired selection the
    list box highlights the first item (if any) that
    matches what the user has entered in the edit
    box. The user can then select the item
    highlighted in the list box to complete the
    choice.

16
ScrollBar Control
  • The ScrollBar control is a rectangle that
    contains a scroll box and has direction arrows at
    both ends. The scroll-bar control sends a
    notification message to its parent whenever the
    user clicks the mouse in the control. The parent
    is responsible for updating the scroll-box
    position. Scroll-bar controls can be positioned
    anywhere in a window and used whenever needed to
    provide scrolling input.

17
Slider Control
  • A slider control, also called a trackbar
    control, lets a user select from a range of
    values by moving a slider. The volume controls in
    the Windows operating system are slider controls.

18
Spin Control
  • A Spin control (also known as an up-down
    control) is a pair of arrow buttons that the user
    can click to increment or decrement a value, such
    as a scroll position or a number displayed in a
    companion control. The value associated with a
    spin button control is called its current
    position. A spin button control is most often
    used with a companion control, called a "buddy
    window."

19
Progress Control
  • A Progress control is a window that an
    application can use to indicate the progress of a
    lengthy operation. It consists of a rectangle
    that is gradually filled with the system
    highlight color as an operation progresses.

20
Tab Control
  • A Tab control defines multiple pages for the
    same area of a window or dialog box. Each page
    consists of a set of information or a group of
    controls that an application displays when the
    user selects the corresponding tab.

21
Picture Control
  • A Picture control allows the user to display a
    picture in your dialog. The developer can specify
    a bitmap or icon resource to be displayed in the
    control. The picture control can also be used to
    provide etched vertical and horizontal lines or a
    frame around other controls.

22
IPAddress Control
  • The IP address control allows the user to enter
    a numeric address in Internet protocol (IP)
    format. This format consists of four three-digit
    fields. Each field is treated individually the
    field numbers are zero-based and proceed from
    left to right. For Comet users this control is
    pretty useless.

23
ListView Control
  • The ListView control displays a collection of
    items each consisting of an optional icon (from
    an image list) and a label. In addition to an
    icon and label, each item can have information
    displayed in columns to the right of the icon and
    label. In report view each item appears on its
    own line, with additional information arranged in
    columns to the right. The leftmost column
    contains the small icon and label, and subsequent
    columns contain subitems as specified by the
    application. Currently Comet does not support
    icons in a ListView control.

24
TreeView Control
  • A TreeView control is a window that displays a
    hierarchical list of items, such as the headings
    in a document, the entries in an index, or the
    files and directories on a disk. Each item
    consists of a label and an optional bitmapped
    image, and each item can have a list of subitems
    associated with it. By clicking an item, the user
    can expand and collapse the associated list of
    subitems. Currently Comet does not support
    bitmaps in a ListView control.

25
DateTimePicker Control
  • The DateTimePicker control provides a simple
    interface to exchange date and time information
    with a user. This interface contains fields, each
    of which displays a part of the date and time
    information stored in the control. The user can
    change the information stored in the control by
    changing the content of the string in a given
    field. The user can move from field to field
    using the mouse or the keyboard.

26
MonthCalendar Control
  • The month calendar control provides the user
    with a simple calendar interface, from which the
    user can select a date. The user can change the
    display by scrolling backward and forward, from
    month to month.
Write a Comment
User Comments (0)
About PowerShow.com