|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IListDialog
Provides access to members that work with a dialog for displaying a list.
The list dialog is a dialog used to present a list of options and allows the user to select one of the options.
To get access to the IListDialog interface, create a new ListDialog object.
Method Summary | |
---|---|
void |
addString(String choice)
Adds a string to the list that the dialog will show. |
boolean |
doModal(String title,
int initialChoice,
int hWnd)
Displays the list dialog and lets the user select a choice. |
int |
getChoice()
The index of the string chosen (use after calling DoModal). |
Method Detail |
---|
void addString(String choice) throws IOException, AutomationException
Choice is a string that will be used as an item in the list displayed by the dialog.
The AddString method is used to populate the list that is displayed in the dialog. When the dialog is displayed, the items in the list are sorted in alphabetical order.
The following code shows a list in the dialog and then reports
the string associated with the selected item. You would get m_app
from the hook in ICommand::OnCreate().
choice
- The choice (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.int getChoice() throws IOException, AutomationException
The Choice property returns the index of the selected item in the list. The items are numbered starting at 0 in the order that they were added, not the order that they appear in the dialog.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.boolean doModal(String title, int initialChoice, int hWnd) throws IOException, AutomationException
Title is a string that specifies the title of the dialog.
initialChoice specifies the index of the item in the list that is initially selected when the dialog is shown. The items are numbered starting at 0 in the order that they were added to the list.
hWnd specifies the window handle of the parent window. In most cases this will be the hWnd of the application.
The DoModal method returns False if the dialog was cancelled.
title
- The title (in)initialChoice
- The initialChoice (in)hWnd
- The hWnd (A COM typedef) (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |