RapidContext
Access > Discovery > Insight
www.rapidcontext.com
Extends:
RapidContext.Widget
The dialog widget class. Used to provide a resizeable and
moveable window within the current page. Internally it uses a
number of <div> HTML elements.
Source code:
RapidContext_Widget_Dialog.js
RapidContext.Widget.Dialog(attrs)
Creates a new dialog widget.
|
moveTo(x, y)
Moves the dialog to the specified position (relative to the
parent DOM node).
|
|
Moves the dialog to the apparent center (relative to the parent DOM
node).
|
|
Resets the scroll offsets for all child elements in the dialog.
|
|
resizeTo(width, height)
Resizes the dialog to the specified size (in pixels).
|
|
Resizes the dialog to the optimal size for the current content.
|
|
setAttrs(attrs)
Updates the dialog or HTML DOM node attributes.
|
onhide()
Emitted when the dialog is hidden.
|
|
onmove()
Emitted when the dialog is moved.
|
|
onresize()
Emitted when the dialog is resized.
|
|
onshow()
Emitted when the dialog is shown.
|
JavaScript:
var h1 = MochiKit.DOM.H1({}, "Hello, world!");
var attrs = { title: "Hello", modal: true };
var helloDialog = RapidContext.Widget.Dialog(attrs, h1);
RapidContext.Util.registerSizeConstraints(helloDialog, "200", "75");
User Interface XML:
<Dialog id="helloDialog" title="Hello" modal="true" w="200" h="75">
<h1>Hello, world!</h1>
</Dialog>
Dialog
wand
hproperties for the actual size used
wand
hproperties for the actual size used