diff --git a/source/text/sbasic/guide/basic_examples.xhp b/source/text/sbasic/guide/basic_examples.xhp
index 7b398d1020..888903b39e 100644
--- a/source/text/sbasic/guide/basic_examples.xhp
+++ b/source/text/sbasic/guide/basic_examples.xhp
@@ -8,7 +8,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
-->
-
Basic Programming Examples
@@ -22,7 +21,16 @@
Basic Programming Examples
-
+
+
+
+
+
+
+
diff --git a/source/text/sbasic/guide/sample_code.xhp b/source/text/sbasic/guide/sample_code.xhp
index cc3ab51d84..7ef8b6a450 100644
--- a/source/text/sbasic/guide/sample_code.xhp
+++ b/source/text/sbasic/guide/sample_code.xhp
@@ -1,6 +1,4 @@
-
-
-
-
-
-Programming Examples for Controls in the Dialog Editor
-/text/sbasic/guide/sample_code.xhp
-
-
-Sun Microsystems, Inc.
-
-
+
+
+ Programming Examples for Controls in the Dialog Editor
+ /text/sbasic/guide/sample_code.xhp
+
+
+ Sun Microsystems, Inc.
+
+
-programming examples for controls
-dialogs;loading (example)
-dialogs;displaying (example)
-controls;reading or editing properties (example)
-list boxes;removing entries from (example)
-list boxes;adding entries to (example)
-examples; programming controls
-dialog editor;programming examples for controls
+ programming examples for controls
+ dialogs;loading (example)
+ dialogs;displaying (example)
+ controls;reading or editing properties (example)
+ list boxes;removing entries from (example)
+ list boxes;adding entries to (example)
+ examples; programming controls
+ dialog editor;programming examples for controls
+ Tools;LoadDialogProgramming Examples for Controls in the Dialog Editor
@@ -48,7 +46,7 @@
Global Function for Loading DialogsFunction LoadDialog(Libname as String, DialogName as String, Optional oLibContainer)
-Dim oLib as Object
+Dim oLib as Object ' com.sun.star.script.XLibraryContainerDim oLibDialog as ObjectDim oRuntimeDialog as Object If IsMissing(oLibContainer) Then
@@ -61,21 +59,26 @@
LoadDialog() = oRuntimeDialogEnd Function
+LoadDialog function is stored in Tools.ModuleControls available from %PRODUCTNAME Macros and Dialogs.Displaying a DialogREM global definition of variablesDim oDialog1 AS ObjectSub StartDialog1
- BasicLibraries.LoadLibrary("Tools")
- oDialog1 = LoadDialog("Standard", "Dialog1")
+ With GlobalScope.BasicLibraries
+ If Not .IsLibraryLoaded("Tools") Then .LoadLibrary("Tools")
+ End With
+ oDialog1 = Tools.ModuleControls.LoadDialog("Standard", "Dialog1") oDialog1.Execute()End SubRead or Edit Properties of Controls in the ProgramSub Sample1
- BasicLibraries.LoadLibrary("Tools")
- oDialog1 = LoadDialog("Standard", "Dialog1")
+ With GlobalScope.Basiclibraries
+ If Not .IsLibraryLoaded("Tools") Then .LoadLibrary("Tools")
+ End With
+ oDialog1 = Tools.LoadDialog("Standard", "Dialog1") REM get dialog model oDialog1Model = oDialog1.Model REM display text of Label1
@@ -101,8 +104,10 @@
Add an Entry to a ListBoxSub AddEntry
- BasicLibraries.LoadLibrary("Tools")
- oDialog1 = LoadDialog("Standard", "Dialog1")
+ With GlobalScope.Basiclibraries
+ If Not .IsLibraryLoaded("Tools") Then .LoadLibrary("Tools")
+ End With
+ oDialog1 = ModuleControls.LoadDialog("Standard", "Dialog1") REM adds a new entry to the ListBox oDialog1Model = oDialog1.Model oListBox = oDialog1.GetControl("ListBox1")
@@ -114,8 +119,10 @@
Remove an Entry from a ListBoxSub RemoveEntry
- BasicLibraries.LoadLibrary("Tools")
- oDialog1 = LoadDialog("Standard", "Dialog1")
+ With GlobalScope.Basiclibraries
+ If Not .IsLibraryLoaded("Tools") Then .LoadLibrary("Tools")
+ End With
+ oDialog1 = Tools.ModuleControls.LoadDialogLoadDialog("Standard", "Dialog1") REM remove the first entry from the ListBox oDialog1Model = oDialog1.Model oListBox = oDialog1.GetControl("ListBox1")
diff --git a/source/text/sbasic/guide/show_dialog.xhp b/source/text/sbasic/guide/show_dialog.xhp
index f59a481b00..117ff796c2 100644
--- a/source/text/sbasic/guide/show_dialog.xhp
+++ b/source/text/sbasic/guide/show_dialog.xhp
@@ -29,13 +29,14 @@
dialogs;using Basic to show (example)examples; showing a dialog with BasicTools;LoadDialog
-Opening a Dialog With Program Code
+
+Opening a Dialog With Basic
In the %PRODUCTNAME 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.Enter the following code for a subroutine called Dialog1Show. In this example, the name of the dialog that you created is "Dialog1":Sub Dialog1Show
- With GlobalScope.Basiclibraries
+ With GlobalScope.BasicLibraries If Not .IsLibraryLoaded("Tools") Then .LoadLibrary("Tools") End With oDialog1 = Tools.ModuleControls.LoadDialog("Standard", "Dialog1")