INTEGRATION: CWS helpcontentbeta (1.1.2); FILE MERGED

2004/10/06 14:55:12 fpe 1.1.2.2: Regular Update
2004/09/16 11:45:09 fpe 1.1.2.1: Regular Update
This commit is contained in:
Rüdiger Timm
2004-11-26 13:40:16 +00:00
parent 0abf932ff5
commit 2300a20dbc

View File

@ -52,40 +52,45 @@
* Contributor(s): _______________________________________
*
*
************************************************************************--><helpdocument version="1.0">
************************************************************************-->
<helpdocument version="1.0">
<meta>
<topic id="textsbasicguideshow_dialogxml" indexer="include" status="PUBLISH">
<title xml-lang="en-US" id="tit">Opening a Dialog With Program Code</title>
<title id="tit" xml-lang="en-US">Opening a Dialog With Program Code</title>
<filename>/text/sbasic/guide/show_dialog.xhp</filename>
</topic>
<history>
<created date="2003-10-31T00:00:00">Sun Microsystems, Inc.</created>
<lastedited date="2003-10-31T00:00:00">converted from old format - fpe</lastedited>
<lastedited date="2004-10-01T13:36:09">converted from old format - fpe</lastedited>
</history>
</meta>
<body>
<bookmark branch="index" xml-lang="en-US" id="bm_id3154140"><bookmark_value>modules and dialogs; toggle</bookmark_value><bookmark_value>examples; show a dialog using program code</bookmark_value></bookmark><paragraph id="hd_id3154140" role="heading" level="1" oldref="1" l10n="U" xml-lang="en-US"><variable id="show_dialog"><link href="text/sbasic/guide/show_dialog.xhp" name="Opening a Dialog With Program Code">Opening a Dialog With Program Code</link></variable></paragraph>
<paragraph xml-lang="en-US" role="paragraph" id="par_id3145171" l10n="U" oldref="2">In the <item type="productname">%PRODUCTNAME</item> BASIC window for a dialog that you created, leave the dialog editor by clicking the name tab of the Module that the dialog is assigned to. The name tab is at the bottom of the window.</paragraph>
<paragraph xml-lang="en-US" role="paragraph" id="par_id3153968" l10n="U" oldref="6">Enter the following code for a subroutine called <emph>Dialog1Show</emph>. In this example, the name of the dialog that you created is &quot;Dialog1&quot;:</paragraph>
<paragraph role="paragraph" id="par_id3156443" l10n="U" xml-lang="en-US" oldref="7">Sub Dialog1Show</paragraph>
<paragraph role="paragraph" id="par_id3148575" l10n="U" xml-lang="en-US" oldref="24">BasicLibraries.LoadLibrary(&quot;Tools&quot;)</paragraph>
<paragraph xml-lang="en-US" role="paragraph" id="par_id3152463" l10n="U" oldref="8">oDialog1 = <link href="text/sbasic/guide/sample_code.xhp" name="LoadDialog">LoadDialog</link>(&quot;Standard&quot;, &quot;Dialog1&quot;)</paragraph>
<paragraph role="paragraph" id="par_id3148646" l10n="U" xml-lang="en-US" oldref="14">oDialog1.Execute()</paragraph>
<paragraph role="paragraph" id="par_id3147349" l10n="U" xml-lang="en-US" oldref="15">End Sub</paragraph>
<paragraph role="paragraph" id="par_id3152596" l10n="U" xml-lang="en-US" oldref="18">Without using &quot;LoadDialog&quot; you can call the code as follows:</paragraph>
<paragraph role="paragraph" id="par_id3163710" l10n="U" xml-lang="en-US" oldref="19">Sub Dialog1Show</paragraph>
<paragraph role="paragraph" id="par_id3146985" l10n="U" xml-lang="en-US" oldref="20">DialogLibraries.LoadLibrary( &quot;Standard&quot; )</paragraph>
<paragraph role="paragraph" id="par_id3155418" l10n="U" xml-lang="en-US" oldref="21">oDialog1 = CreateUnoDialog( DialogLibraries.Standard.Dialog1 )</paragraph>
<paragraph role="paragraph" id="par_id3154944" l10n="U" xml-lang="en-US" oldref="22">oDialog1.Execute()</paragraph>
<paragraph role="paragraph" id="par_id3145800" l10n="U" xml-lang="en-US" oldref="23">End Sub</paragraph>
<paragraph role="paragraph" id="par_id3153157" l10n="U" xml-lang="en-US" oldref="16">When you execute this code, &quot;Dialog1&quot; opens. To close the dialog, click the closer (x) on its title bar.</paragraph>
<embed href="text/shared/00/00000004.xhp#related"/>
<embed href="text/sbasic/guide/control_properties.xhp#control_properties"/>
<embed href="text/sbasic/guide/create_dialog.xhp#create_dialog"/>
<embed href="text/sbasic/guide/insert_control.xhp#insert_control"/>
<embed href="text/sbasic/guide/sample_code.xhp#sample_code"/>
</body>
<bookmark xml-lang="en-US" branch="index" id="bm_id3154140"><bookmark_value>modules and dialogs; toggle</bookmark_value>
<bookmark_value>dialogs;using program code to show (example)</bookmark_value>
<bookmark_value>examples; showing a dialog using program code</bookmark_value>
</bookmark>
<paragraph role="heading" id="hd_id3154140" xml-lang="en-US" level="1" l10n="U" oldref="1"><variable id="show_dialog"><link href="text/sbasic/guide/show_dialog.xhp" name="Opening a Dialog With Program Code">Opening a Dialog With Program Code</link>
</variable></paragraph>
<paragraph role="paragraph" id="par_id3145171" xml-lang="en-US" l10n="U" oldref="2">In the <item type="productname">%PRODUCTNAME</item> BASIC window for a dialog that you created, leave the dialog editor by clicking the name tab of the Module that the dialog is assigned to. The name tab is at the bottom of the window.</paragraph>
<paragraph role="paragraph" id="par_id3153968" xml-lang="en-US" l10n="U" oldref="6">Enter the following code for a subroutine called <emph>Dialog1Show</emph>. In this example, the name of the dialog that you created is "Dialog1":</paragraph>
<paragraph role="code" id="par_id3156443" xml-lang="en-US" l10n="U" oldref="7">Sub Dialog1Show</paragraph>
<paragraph role="code" id="par_id3148575" xml-lang="en-US" l10n="U" oldref="24">BasicLibraries.LoadLibrary("Tools")</paragraph>
<paragraph role="code" id="par_id3152463" xml-lang="en-US" l10n="U" oldref="8">oDialog1 = <link href="text/sbasic/guide/sample_code.xhp" name="LoadDialog">LoadDialog</link>("Standard", "Dialog1")</paragraph>
<paragraph role="code" id="par_id3148646" xml-lang="en-US" l10n="U" oldref="14">oDialog1.Execute()</paragraph>
<paragraph role="code" id="par_id3147349" xml-lang="en-US" l10n="U" oldref="15">End Sub</paragraph>
<paragraph role="code" id="par_id3152596" xml-lang="en-US" l10n="U" oldref="18">Without using "LoadDialog" you can call the code as follows:</paragraph>
<paragraph role="code" id="par_id3163710" xml-lang="en-US" l10n="U" oldref="19">Sub Dialog1Show</paragraph>
<paragraph role="code" id="par_id3146985" xml-lang="en-US" l10n="U" oldref="20">DialogLibraries.LoadLibrary( "Standard" )</paragraph>
<paragraph role="code" id="par_id3155418" xml-lang="en-US" l10n="U" oldref="21">oDialog1 = CreateUnoDialog( DialogLibraries.Standard.Dialog1 )</paragraph>
<paragraph role="code" id="par_id3154944" xml-lang="en-US" l10n="U" oldref="22">oDialog1.Execute()</paragraph>
<paragraph role="code" id="par_id3145800" xml-lang="en-US" l10n="U" oldref="23">End Sub</paragraph>
<paragraph role="paragraph" id="par_id3153157" xml-lang="en-US" l10n="U" oldref="16">When you execute this code, "Dialog1" opens. To close the dialog, click the close button (x) on its title bar.</paragraph>
<section id="relatedtopics">
<embed href="text/sbasic/guide/control_properties.xhp#control_properties"/>
<embed href="text/sbasic/guide/create_dialog.xhp#create_dialog"/>
<embed href="text/sbasic/guide/insert_control.xhp#insert_control"/>
<embed href="text/sbasic/guide/sample_code.xhp#sample_code"/>
</section>
</body>
</helpdocument>