AGI Ui Plugins 11 Send comments on this topic.
ShowDialog Method (IAgUiPluginHtmlWindowSite)
See Also  Example
Plugin
A User Interface plugin object.
Url
A URL of the document to display.
DialogParams
Optional parameters that can be used to specify an initial size and position of the window.





Description

Opens a modal HTML window and loads the document specified by a given URL.

Syntax

[Visual Basic .NET]
Public Function ShowDialog( _
   ByVal Plugin As IAgUiPlugin, _
   ByVal Url As String, _
   ByRef DialogParams As System.Array _
) As Integer

[C#]
public int ShowDialog(
IAgUiPlugin Plugin,
string Url,
ref System.Array DialogParams
);

[Managed C++]
public: int ShowDialog(
IAgUiPlugin ^ Plugin,
String __gc ^ Url,
System::Array ^^ DialogParams
);

[Java]
public int showDialog(
IAgUiPlugin Plugin,
String Url,
Object[] DialogParams
);

[Unmanaged C++]
public: HRESULT ShowDialog(
IAgUiPlugin * Plugin,
BSTR Url,
SAFEARRAY ** DialogParams,
long * ReturnValue
);

Parameters

Plugin
A User Interface plugin object.
Url
A URL of the document to display.
DialogParams
Optional parameters that can be used to specify an initial size and position of the window.

Remarks

ShowDialog method opens an HTML browser in a modal dialog and displays the contents of the document using the specified URL.

Example

Open an HTML document in a modal dialog Copy Code
// IAgUiPluginSite Site; 
 
IAgUiPluginHtmlWindowSite windowSite = Site as IAgUiPluginHtmlWindowSite; 
Array @params = Array.CreateInstance(typeof(object), 0); 
int ret = windowSite.ShowDialog(this"http://www.agi.com"ref @params); 

Open an HTML document in a modal dialog using specified position and size Copy Code
// IAgUiPluginSite Site; 
 
IAgUiPluginHtmlWindowSite windowSite = Site as IAgUiPluginHtmlWindowSite; 
Array @params = Array.CreateInstance(typeof(object), 5); 
 
//@params[0] = caption text 
//@params[1] = left 
//@params[2] = top 
//@params[3] = width 
//@params[4] = height     
 
@params.SetValue("A custom HTML dialog"0); 
@params.SetValue(1001); 
@params.SetValue(1002); 
@params.SetValue(6003); 
@params.SetValue(6004); 
int ret = windowSite.ShowDialog(this"http://www.agi.com"ref @params); 

See Also

© 2016 Analytical Graphics, Inc. All Rights Reserved.

STK Programming Interface 11.0.1