Edukiak

# SFDialogs.Dialog zerbitzua

The Dialog service contributes to the management of dialogs created with the Basic Dialog Editor or dialogs created on-the-fly. Each instance of the current class represents a single dialog box displayed to the user.

Elkarrizketa-koadroak modu modalean edo ez modalean bistaratu daiteke.

Modu modalean, elkarrizketa-koadroa bistaratu eta makro-prozesuaren exekuzioa gelditu egingo da 'Ados' edo 'Utzi' botoia sakatu arte. Bitartean, elkarrizketa-koadroaren barruan erabiltzaileak exekutatutako ekintzek beste ekintza batzuk abiarazi ditzakete.

Modu ez modalean, elkarrizketa-koadroak "flotatu" egingo du erabiltzailearen mahaigainean eta makro-prozesuaren exekuzioak aurrera jarraituko du. Elkarrizketa-koadro ez modalak ixteko, Terminate() metodoa erabili behar da edo LibreOffice saioa amaitu behar da. Leihoa ixteko botoia desaktibatuta ageri da elkarrizketa-koadro ez modaletan.

Elkarrizketa-koadro bat memoriatik desagertzen da hura esplizituki amaitu ondoren.

SFDialogs.Dialog zerbitzua SFDialogs.DialogControl zerbitzuarekin estuki erlazionatuta dago.

## Zerbitzuari deitzea eta hura erabiltzea

Dialog zerbitzua erabiltzeko, ScriptForge liburutegia kargatu edo inportatu behar da:

• Basic makroak erabiltzkeo, ScriptForge liburutegia kargatu behar da honako instrukzioa erabiliz:
GlobalScope.BasicLibraries.loadLibrary("ScriptForge")
• Python scriptak erabiltzeko, berriz, scriptforge modulu baten inportazioa behar dute:
from scriptforge import CreateScriptService

The Dialog service is invoked through the CreateScriptService method. It requires three supplemental positional arguments to specify the dialog box to activate:

Container: "GlobalScope" aurretik instalatutako liburutegietarako, edo ScriptForge.UI zerbitzuak definitzen duen moduko leiho-izen bat. Balio lehenetsiak, "" kate hutsak, uneko dokumentuari dagokio.

Library: Edukiontziak duen liburutegi baten izena, maiuskulak/minuskulak bereizten ditu. Balio lehenetsia "Standard" da.

DialogName: Elkarrizketa-koadroa izendatzeko erabilitako kate bat, maiuskulak/minuskulak bereizten ditu.

Basic eta Python lengoaiakoak diren beheko adibideek ScriptForge liburutegi partekatukoa den dlgConsole elkarrizketa-koadroa bistaratzen dute:

          Dim oDlg As Object, lButton As Long
          Dim Container As String, Library As String, DialogName As String
          Set oDlg = CreateScriptService("SFDialogs.Dialog", "GlobalScope", "ScriptForge", "dlgConsole")
          '...kontrolen hasieratzea hemen doa...
          lButton = oDlg.Execute()
          'Modu lehenetsia = Modal
          If lButton = oDlg.OKBUTTON Then
          '...Prozestatu kontrolak prozesatu eta egin egin beharrekoa hemen
          End If
          oDlg.Terminate()

Edo Python erabilita:

        dlg = CreateScriptService('SFDialogs.Dialog', 'GlobalScope', 'ScriptForge', 'dlgConsole')
        # ...kontrolen hasieratzea hemen doa...
        rc = dlg.Execute()
        # Modu lehenetsia Modal da
        if rc == dlg.OKBUTTON:
            #...Prozestatu kontrolak prozesatu eta egin egin beharrekoa hemen
        dlg.Terminate()

Erabili "GlobalScope" katea edukiontzi argumentu gisa elkarrizketa-koadroa Nire makroak eta elkarrizketak edo Aplikazioaren makroak eta elkarrizketak ataletan gordetzen direnean.

The dialog service offers methods that create new controls dynamically in an existing dialog predefined with the Dialog Editor. A dialog is initialized with controls in the Dialog Editor and new controls can be added at run-time before or after the dialog Execute() statement.

The Dialog service can equally be invoked - through the CreateScriptService method - when creating dialogs on-the-fly. It requires two supplemental positional arguments after the name of the ad-hoc service "NewDialog":

DialogName: A case-sensitive string designating the dialog.

Place: Window location of the dialog being either :

- a Basic Array or Python tuple with 4 elements: (X, Y, width, height)

- a com.sun.star.awt.Rectangle [X, Y, Width, Height] object

All elements are expressed in Map AppFont units.

        Sub newDialog()
            Dim oDlg As Object
           oDlg = CreateScriptService("NewDialog", "myDialog1", Array(100,200, 40, 110))
           ' ...
        End Sub

Or using Python:

        def newDialog():
           dlg = CreateScriptService('NewDialog', 'myDialog1', (100,200, 40, 110))
           # ... Process controls and do what is needed

All properties and methods applicable to predefined dialogs are available for such new dialogs. In particular the series of CreateXXX() methods for the addition of new dialog controls.

## Elkarrizketa-gertaera abiarazi zuen 'Elkarrizketa' instantzia atzitzea

Dialog zerbitzuaren instantzia bat atzitzeko, erabili SFDialogs.DialogEvent zerbitzua, elkarrizketa-koadroa Dialog zerbitzuarekin hasieratu bada. Beheko adibidean, oDlg aldagaiak elkarrizketa-koadroaren gertaera abiarazi zuen Dialog instantzia dauka.

        Sub aDialogEventHander(ByRef poEvent As Object)
            Dim oDlg As Object
            Set oDlg = CreateScriptService("SFDialogs.DialogEvent", poEvent)
            ' ...
        End Sub

Edo Python bidez:

        def control_event_handler(event: uno):
            dlg = CreateScriptService("SFDialogs.DialogEvent", event)
            # ...

Kontuan izan aurreko adibideetako "SFDialogs." aurrizkia ez dela derrigorrezkoa.

### Salbuespenak maneiatzea gertaera-maneiatzaileetan

Elkarrizketa-koadroetako gertaeretarako maneiatzaileak sortzean, erroreak azpierrutinaren beraren barruan maneiatzea praktika ontzat hartzen da. Adibidez, demagun beheko gertaera-maneiatzaileari saguaren botoia elkarrizketa-koadroan sakatzean deitzen zaiola.

        Sub OnMouseButtonPressed(ByRef oEvent As Object)
        On Local Error GoTo Catch
            Dim oDialog As Object
            oDialog = CreateScriptService("DialogEvent", oEvent)
            ' Prozesatu gertaera
            Exit Sub
        Catch:
            MsgBox SF_Exception.Description
            SF_Exception.Clear
        End Sub

Deitu SF_Exception.Clear funtzioari elkarrizketa-koadroaren exekuzioa amaitu ondoren errorea hedatu ez dadin nahi izanez gero.

Python lengoaian, erabili salbuespenak maneiatzeko jatorrizko try/except blokeak, behean adierazten den moduan:

        def on_mouse_button_pressed(event=None):
            try:
                dlg = CreateScriptService("DialogEvent", event)
                # Prozesatu gertaera
            except Exception as e:
                # "bas" objektua Basic zerbitzuaren instantzia bat da
                bas.MsgBox(str(e))

## Propietateak

Izena | Irakurtzeko soilik | Mota | Deskribapena
--- | --- | --- | ---
OKBUTTON | Bai | Integer | Balioa = 1. 'Ados' botoi bat sakatu da.
CANCELBUTTON | Bai | Integer | Balioa = 0. 'Utzi' botoi bat sakatu da.
Caption | Ez | String | Elkarrizketa-koadroaren izenburua zehazten du.
Height | Ez | Long | Elkarrizketa-koadroaren altuera zehazten du.
Modal | Bai | Boolean | Elkarrizketa-koadroa unean modu modalean exekutatzen ari den zehazten du.
Name | Bai | String | Elkarrizketa-koadroaren izena.
Page | Ez | Integer | Elkarrizketa-koadro batek orri bat baino gehiago eduki dezake, eta erabiltzaileak urratsez urrats zehazkatu behar ditu. 'Dialog' objektuaren 'Page' propietateak definitzen du elkarrizketa-koadroaren zein orri dagoen aktibo.
Visible | Ez | Boolean | Elkarrizketa-koadroa mahaigainean ikusgai dagoen zehazten du. Modu lehenetsian ez da ikusgai egongo 'Exekute()' metodoa exekutatu arte.
XDialogModel | Bai | UNO object | Elkarrizketa-koadroa ordezkatzen duen UNO objektua. Begiratu APIaren dokumentazioko XControlModel eta UnoControlDialogModel informazio xeheagorako.
XDialogView | Bai | UNO object | Elkarrizketa-koadroaren bista ordezkatzen duen UNO objektua. Begiartu APIaren dokumentazioko XControl eta UnoControlDialog informazio xeheagorako.
Width | Ez | Long | Elkarrizketa-koadroaren zabalera zehazten du.

## Gertaeraren propietateak

On… event properties are URI strings that reference a script triggered for an event. Read its specification in the scripting framework URI specification.

Izena | Basic IDEaren deskribapena
--- | ---
OnFocusGained | Fokua hartzean
OnFocusLost | Fokua galtzean
OnKeyPressed | Tekla sakatuta
OnKeyReleased | Tekla askatuta
OnMouseDragged | Tekla sakatuta dagoenean sagua arrastatzean
OnMouseEntered | Sagua barnean dagoenean
OnMouseExited | Sagua kanpoan dagoenean
OnMouseMoved | Sagua mugitzean
OnMousePressed | Saguaren botoia sakatzean
OnMouseReleased | Saguaren botoia askatzean

Tip: All On… properties can be set programmatically.
How to display data in a tree control example in LibreOffice Wiki demonstrates such.

Assigning events via the Basic IDE and assigning events via macros are mutually exclusive.

List of Methods in the Dialog Service
Activate Center Controls CloneControl CreateButton CreateCheckBox CreateComboBox CreateCurrencyField CreateDateField CreateFileControl CreateFixedLine CreateFixedText | CreateFormattedField CreateGroupBox CreateHyperlink CreateImageControl CreateListBox CreateNumericField CreatePatternField CreateProgressBar CreateRadioButton CreateScrollBar CreateTableControl CreateTabPageContainer | CreateTextField CreateTimeField CreateTreeControl EndExecute Execute GetTextsFromL10N ImportControl OrderTabs Resize SetPageManager Terminate

TabPageContainer controls are not available in Dialog Editor.

Dimensioning a dialog is done by using Map AppFont units. A dialog or control model also uses AppFont units. While their views use pixels.

## Activate

Ezarri fokua uneko Dialog instantzian. Itzuli True fokuratzeko ongi egin bada.

Metodo honi elkarrizketa-koadro batetik edo kontrol-gertaera batetik deitzen zaio, edo elkarrizketa-koadro bat modu ez modalean bistaratzen denean.

### Sintaxia:

svc.Activate(): bool

### Adibidea:

          Dim oDlg As Object
          Set oDlg = CreateScriptService(,, "myDialog")
          oDlg.Execute()
          ' ...
          oDlg.Activate()

Python zein LibreOffice Basic adibideek espero dute elkarrizketa-koadroa uneko dokumentuaren Standard liburutegian biltegiratuta egongo dela.

         dlg = CreateScriptService(,,'myDialog')
         dlg.Execute()
         # ...
         dlg.Activate()

## Center

Uneko elkarrizketa-koadroa leiho gurasoaren erdian zentratzen du. Argumenturik gabe, metodoak uneko leihoaren erdian zentratuko du elkarrizketa-koadroa.

True (egia) itzultzen du ongi gauzatzen denean.

### Sintaxia:

svc.Center(opt Parent: obj): bool

### Parametroak:

Parent: Aukerako objektu bat, hauetako bat izan daiteke…

- ScriptForge elkarrizketa-koadro bat den objektua

- ScriptForge dokumentu bat (Calc, Base, ...) den objektua

### Adibidea:

##### Basic lengoaian

         Sub TriggerEvent(oEvent As Object)
             Dim oDialog1 As Object, oDialog2 As Object, lExec As Long
             Set oDialog1 = CreateScriptService("DialogEvent", oEvent) ' Gertaera eragin duen elkarrizketa-koadroa
             Set oDialog2 = CreateScriptService("Dialog", ...) ' Ireki bigarren elkarrizketa-koadro bat
             oDialog2.Center(oDialog1)
             lExec = oDialog2.Execute()
             Select Case lExec
                 ...
         End Sub

##### Python lengoaian

         def triggerEvent(event: uno):
           dlg1 = CreateScriptService('DialogEvent.Dialog', event)  # Gertaera eragin duen elkarrizketa-koadroa
           dlg2 = CreateScriptService('Dialog', ...)  # Ireki bigarren elkarrizketa-koadro bat
           dlg2.Center(dlg1)
           rc = dlg2.Execute()
           if rc is False:
             # ...

## CloneControl

Duplicate an existing control of any type in the actual dialog. The duplicated control is left unchanged and can be relocated.

### Sintaxia:

svc.CloneControl(SourceName: str, ControlName: str, Left: num, Top: num): svc

### Parametroak:

SourceName: The name of the control to duplicate.

ControlName: A valid control name as a case-sensitive string. It must not exist yet.

Left, Top: The coordinates of the new control expressed in Map AppFont units.

### Return type:

An instance of SFDialogs.DialogControl service or Nothing.

### Adibidea:

##### Basic lengoaian

          Set myButton2 = oDlg.CloneControl("Button1", "Button2", 30, 30)

##### Python lengoaian

         dlg = dlg.CloneControl('Button1', 'Button2', 30, 30)

## Controls

Hauetako bat itzultzen du:

- elkarrizketa-koadroak dituen kontrolen zerrenda

- bere izenean oinarritutako DialogControl klase-instantzia bat

### Sintaxia:

svc.Controls(): str[0..*]

svc.Controls(controlname: str): svc

### Parametroak:

ControlName : Baliozko kontrol-izen bat, maiuskulak/minuskulak bereizita, kate gisa. Ez badago, itzuliko den kontrol-izenen zerrenda zeron oinarritutako matrize bat izango da.

### Adibidea:

          Dim myDialog As Object, myList As Variant, myControl As Object
          Set myDialog = CreateScriptService("SFDialogs.Dialog", , "Standard", "Dialog1")
          myList = myDialog.Controls()
          Set myControl = myDialog.Controls("myTextBox")

         dlg = CreateScriptService('SFDialogs.Dialog','', 'Standard', 'Dialog1')
         ctrls = dlg.Controls()
         ctrl = dlg.Controls('myTextBox')

## CreateButton

Creates a new control of type Button in the current dialog.

### Sintaxia:

svc.CreateButton(ControlName: str, Place: any, Toggle: bool = False, Push: str = ""): svc

### Parametroak:

ControlName: the name of the new control. It must not exist yet.

Place: either …

- a Basic Array or Python tuple with 4 elements: (X, Y, width, height)

- a com.sun.star.awt.Rectangle [X, Y, Width, Height] object

All elements are expressed in Map AppFont units.

Toggle: when True a Toggle button is created. Default = False

Push: "OK", "CANCEL" or "" (default)

### Return type:

An instance of SFDialogs.DialogControl service or Nothing.

### Adibidea:

##### Basic lengoaian

         Set myButton = oDlg.CreateButton("Button1", Array(20, 20, 60, 15))

##### Python lengoaian

         myButton = dlg.CreateButton('Button1', (20, 20, 60, 15))

## CreateCheckBox

Creates a new control of type CheckBox in the current dialog.

### Sintaxia:

svc.CreateCheckBox(ControlName: str, Place: any, Multiline: bool = False): svc

### Parametroak:

ControlName: the name of the new control. It must not exist yet.

Place: either …

- a Basic Array or Python tuple with 4 elements: (X, Y, width, height)

- a com.sun.star.awt.Rectangle [X, Y, Width, Height] object

All elements are expressed in Map AppFont units.

MultiLine: When True (default = False), the caption may be displayed on more than one line.

### Return type:

An instance of SFDialogs.DialogControl service or Nothing.

### Adibidea:

##### Basic lengoaian

         Set myCheckBox = oDlg.CreateCheckBox("CheckBox1", Array(20, 20, 60, 15), MultiLine := True)

##### Python lengoaian

         myCheckBox = dlg.CreateCheckBox('CheckBox1', (20, 20, 60, 15), MultiLine = True)

## CreateComboBox

Creates a new control of type ComboBox in the current dialog.

### Sintaxia:

svc.CreateComboBox(ControlName: str, Place: any, Border: str = "3D", DropDown: bool = True, LineCount: num = 5): svc

### Parametroak:

ControlName: the name of the new control. It must not exist yet.

Place: either …

- a Basic Array or Python tuple with 4 elements: (X, Y, width, height)

- a com.sun.star.awt.Rectangle [X, Y, Width, Height] object

All elements are expressed in Map AppFont units.

Border: "3D" (default), "FLAT" or "NONE"

DropDown: When True (default), a drop down button is displayed

LineCount: Specifies the maximum line count displayed in the drop down (default = 5)

### Return type:

An instance of SFDialogs.DialogControl service or Nothing.

### Adibidea:

##### Basic lengoaian

         Set myComboBox = oDlg.CreateComboBox("ComboBox1", Array(20, 20, 60, 15), Dropdown := True)

##### Python lengoaian

         myComboBox = dlg.CreateComboBox('ComboBox1', (20, 20, 60, 15), Dropdown = True)

## CreateCurrencyField

Creates a new control of type CurrencyField in the current dialog.

### Sintaxia:

svc.CreateCurrencyField(ControlName: str, Place: any, Border ="3D", SpinButton: bool = False, MinValue: num = -1000000, MaxValue: num = +1000000, Increment: num = 1, Accuracy: num = 2): svc

### Parametroak:

ControlName: the name of the new control. It must not exist yet.

Place: either …

- a Basic Array or Python tuple with 4 elements: (X, Y, width, height)

- a com.sun.star.awt.Rectangle [X, Y, Width, Height] object

All elements are expressed in Map AppFont units.

Border: "3D" (default), "FLAT" or "NONE"

SpinButton: when True (default = False), a spin button is present

MinValue: the smallest value that can be entered in the control. Default = -1000000

MaxValue: the largest value that can be entered in the control. Default = +1000000

Increment: the step when the spin button is pressed. Default = 1

Accuracy: specifies the decimal accuracy. Default = 2 decimal digits

### Return type:

An instance of SFDialogs.DialogControl service or Nothing.

### Adibidea:

##### Basic lengoaian

         Set myCurrencyField = oDlg.CreateCurrencyField("CurrencyField1", Array(20, 20, 60, 15), SpinButton := True)

##### Python lengoaian

         myCurrencyField = dlg.CreateCurrencyField('CurrencyField1', (20, 20, 60, 15), SpinButton = True)

## CreateDateField

Creates a new control of type DateField in the current dialog.

### Sintaxia:

svc.CreateDateField(ControlName: str, Place: any, Border: str = "3D", DropDown: bool = False, opt MinDate: datetime, opt MaxDate: datetime): svc

### Parametroak:

ControlName: the name of the new control. It must not exist yet.

Place: either …

- a Basic Array or Python tuple with 4 elements: (X, Y, width, height)

- a com.sun.star.awt.Rectangle [X, Y, Width, Height] object

All elements are expressed in Map AppFont units.

Border: "3D" (default), "FLAT" or "NONE"

DropDown: when True (default = False), a dropdown button is shown

MinDate: the smallest date that can be entered in the control. Default = 1900-01-01

MaxDate: the largest date that can be entered in the control. Default = 2200-12-31

### Return type:

An instance of SFDialogs.DialogControl service or Nothing.

### Adibidea:

##### Basic lengoaian

         Set myDateField = oDlg.CreateDateField("DateField1", Array(20, 20, 60, 15), Dropdown := True)

##### Python lengoaian

         myDateField = dlg.CreateDateField('DateField1', (20, 20, 60, 15), Dropdown = True)

## CreateFileControl

Creates a new control of type FileControl in the current dialog.

### Sintaxia:

svc.CreateFileControl(ControlName: str, Place: any, Border: str = "3D"): svc

### Parametroak:

ControlName: the name of the new control. It must not exist yet.

Place: either …

- a Basic Array or Python tuple with 4 elements: (X, Y, width, height)

- a com.sun.star.awt.Rectangle [X, Y, Width, Height] object

All elements are expressed in Map AppFont units.

Border: "3D" (default), "FLAT" or "NONE"

### Return type:

An instance of SFDialogs.DialogControl service or Nothing.

### Adibidea:

##### Basic lengoaian

         Set myFileControl = oDlg.CreateFileControl("FileControl1", Array(20, 20, 60, 15))

##### Python lengoaian

         myFileControl = dlg.CreateFileControl('FileControl1', (20, 20, 60, 15))

## CreateFixedLine

Creates a new control of type FixedLine in the current dialog.

### Sintaxia:

svc.CreateFixedLine(ControlName: str, Place: any, Orientation: str): svc

### Parametroak:

ControlName: the name of the new control. It must not exist yet.

Place: either …

- a Basic Array or Python tuple with 4 elements: (X, Y, width, height)

- a com.sun.star.awt.Rectangle [X, Y, Width, Height] object

All elements are expressed in Map AppFont units.

Orientation: for horizontal orientation use "H" or "Horizontal"; for vertical orientation use "V" or "Vertical".

### Return type:

An instance of SFDialogs.DialogControl service or Nothing.

### Adibidea:

##### Basic lengoaian

         Set myFixedLine = oDlg.CreateFixedLine("FixedLine1", Array(20, 20, 60, 15), Orientation := "vertical")

##### Python lengoaian

         myFixedLine = dlg.CreateFixedLine('FixedLine1', (20, 20, 60, 15), Orientation = 'vertical')

## CreateFixedText

Creates a new control of type FixedText in the current dialog.

### Sintaxia:

svc.CreateFixedText(ControlName: str, Place: any, Border: str = "3D", MultiLine: bool = False, Align: str = "LEFT", VerticalAlign: str = "TOP"): svc

### Parametroak:

ControlName: the name of the new control. It must not exist yet.

Place: either …

- a Basic Array or Python tuple with 4 elements: (X, Y, width, height)

- a com.sun.star.awt.Rectangle [X, Y, Width, Height] object

All elements are expressed in Map AppFont units.

Border: "NONE" (default), "FLAT" or "3D"

Multiline: When True (default = False), the caption may be displayed on more than one line

Align: horizontal alignment, "LEFT" (default), "CENTER" or "RIGHT"

VerticalAlign: vertical alignment, "TOP" (default), "MIDDLE" or "BOTTOM"

### Return type:

An instance of SFDialogs.DialogControl service or Nothing.

### Adibidea:

##### Basic lengoaian

         Set myFixedText = oDlg.CreateFixedText("FixedText1", Array(20, 20, 60, 15), MultiLine := True)

##### Python lengoaian

         myFixedText = dlg.CreateFixedText('FixedText1', (20, 20, 60, 15), MultiLine = True)

## CreateFormattedField

Creates a new control of type FormattedField in the current dialog.

### Sintaxia:

svc.CreateFormattedField(ControlName: str, Place: any, Border: str = "3D", SpinButton: bool = False, MinValue: num = -1000000, MaxValue: num = +1000000): svc

### Parametroak:

ControlName: the name of the new control. It must not exist yet.

Place: either …

- a Basic Array or Python tuple with 4 elements: (X, Y, width, height)

- a com.sun.star.awt.Rectangle [X, Y, Width, Height] object

All elements are expressed in Map AppFont units.

Border: "3D" (default), "FLAT" or "NONE"

SpinButton: when True (default = False), a spin button is present

MinValue: the smallest value that can be entered in the control. Default = -1000000

MaxValue: the largest value that can be entered in the control. Default = +1000000

### Return type:

An instance of SFDialogs.DialogControl service or Nothing.

### Adibidea:

##### Basic lengoaian

         Set myFormattedField = oDlg.CreateFormattedField("FormattedField1", Array(20, 20, 60, 15), SpinButton := True)

##### Python lengoaian

         myFormattedField = dlg.CreateFormattedField('FormattedField1', (20, 20, 60, 15), SpinButton = True)

## CreateGroupBox

Creates a new control of type GroupBox in the current dialog.

### Sintaxia:

svc.CreateGroupBox(ControlName: str, Place: any): svc

### Parametroak:

ControlName: the name of the new control. It must not exist yet.

Place: either …

- a Basic Array or Python tuple with 4 elements: (X, Y, width, height)

- a com.sun.star.awt.Rectangle [X, Y, Width, Height] object

All elements are expressed in Map AppFont units.

### Return type:

An instance of SFDialogs.DialogControl service or Nothing.

### Adibidea:

##### Basic lengoaian

         Set myGroupBox = oDlg.CreateGroupBox("GroupBox1", Array(20, 20, 60, 15))

##### Python lengoaian

         myGroupBox = dlg.CreateGroupBox('GroupBox1', (20, 20, 60, 15))

## CreateHyperlink

Creates a new control of type Hyperlink in the current dialog.

### Sintaxia:

svc.CreateHyperlink(ControlName: str, Place: any, Border: str = "NONE", MultiLine: bool = False, Align: str = "LEFT", VerticalAlign: str = "TOP"): svc

### Parametroak:

ControlName: the name of the new control. It must not exist yet.

Place: either …

- a Basic Array or Python tuple with 4 elements: (X, Y, width, height)

- a com.sun.star.awt.Rectangle [X, Y, Width, Height] object

All elements are expressed in Map AppFont units.

Border: "NONE" (default), "FLAT" or "3D"

MultiLine: When True (default = False), the caption may be displayed on more than one line

Align: horizontal alignment, "LEFT" (default), "CENTER" or "RIGHT"

VerticalAlign: vertical alignment, "TOP" (default), "MIDDLE" or "BOTTOM"

### Return type:

An instance of SFDialogs.DialogControl service or Nothing.

### Adibidea:

##### Basic lengoaian

         Set myHyperlink = oDlg.CreateHyperlink("Hyperlink1", Array(20, 20, 60, 15), MultiLine := True)

##### Python lengoaian

         myHyperlink = dlg.CreateHyperlink('Hyperlink1', (20, 20, 60, 15), MultiLine = True)

## CreateImageControl

Creates a new control of type ImageControl in the current dialog.

### Sintaxia:

svc.CreateImageControl(ControlName: str, Place: any, Border: str = "3D", Scale: str = "FITTOSIZE"): svc

### Parametroak:

ControlName: the name of the new control. It must not exist yet.

Place: either …

- a Basic Array or Python tuple with 4 elements: (X, Y, width, height)

- a com.sun.star.awt.Rectangle [X, Y, Width, Height] object

All elements are expressed in Map AppFont units.

Border: "3D" (default), "FLAT" or "NONE"

Scale: One of next values: "FITTOSIZE" (default), "KEEPRATIO" or "NO"

### Return type:

An instance of SFDialogs.DialogControl service or Nothing.

### Adibidea:

##### Basic lengoaian

         Set myImageControl = oDlg.CreateImageControl("ImageControl1", Array(20, 20, 60, 15))

##### Python lengoaian

           myImageControl = dlg.CreateImageControl('ImageControl1", (20, 20, 60, 15))

## CreateListBox

Creates a new control of type ListBox in the current dialog.

### Sintaxia:

svc.CreateListBox(ControlName: str, Place: any, Border: str = "3D", DropDown: bool = True, LineCount: num = 5, MultiSelect: bool = False): svc

### Parametroak:

ControlName: the name of the new control. It must not exist yet.

Place: either …

- a Basic Array or Python tuple with 4 elements: (X, Y, width, height)

- a com.sun.star.awt.Rectangle [X, Y, Width, Height] object

All elements are expressed in Map AppFont units.

Border: "3D" (default), "FLAT" or "NONE"

DropDown: When True (default), a drop down button is displayed

LineCount: Specifies the maximum line count displayed in the drop down (default = 5)

MultiSelect: When True, more than 1 entry may be selected. Default = False

### Return type:

An instance of SFDialogs.DialogControl service or Nothing.

### Adibidea:

##### Basic lengoaian

         Set myListBox = oDlg.CreateListBox("ListBox1", Array(20, 20, 60, 15), Dropdown := True, MultiSelect := True)

##### Python lengoaian

         myListBox = dlg.CreateListBox('ListBox1', (20, 20, 60, 15), Dropdown = True, MultiSelect = True)

## CreateNumericField

Creates a new control of type NumericField in the current dialog.

### Sintaxia:

svc.CreateNumericField(ControlName: str, Place: any, Border: str = "3D", SpinButton: bool = False, MinValue: num = -1000000, MaxValue: num = 1000000, Increment: num = 1, Accuracy: num = 2): svc

### Parametroak:

ControlName: the name of the new control. It must not exist yet.

Place: either …

- a Basic Array or Python tuple with 4 elements: (X, Y, width, height)

- a com.sun.star.awt.Rectangle [X, Y, Width, Height] object

All elements are expressed in Map AppFont units.

Border: "3D" (default), "FLAT" or "NONE"

SpinButton: when True (default = False), a spin button is present

MinValue: the smallest value that can be entered in the control. Default = -1000000

MaxValue: the largest value that can be entered in the control. Default = +1000000

Increment: the step when the spin button is pressed. Default = 1

Accuracy: specifies the decimal accuracy. Default = 2 decimal digits

### Return type:

An instance of SFDialogs.DialogControl service or Nothing.

### Adibidea:

##### Basic lengoaian

         Set myNumericField = oDlg.CreateNumericField("NumericField1", Array(20, 20, 60, 15), SpinButton := True)

##### Python lengoaian

         myNumericField = dlg.CreateNumericField('NumericField1', (20, 20, 60, 15), SpinButton = True)

## CreatePatternField

Creates a new control of type PatternField in the current dialog.

### Sintaxia:

svc.CreatePatternField(ControlName: str, Place: any, Border: str = "3D", EditMask: str, opt LiteralMax: str): svc

### Parametroak:

ControlName: the name of the new control. It must not exist yet.

Place: either …

- a Basic Array or Python tuple with 4 elements: (X, Y, width, height)

- a com.sun.star.awt.Rectangle [X, Y, Width, Height] object

All elements are expressed in Map AppFont units.

Border: "3D" (default), "FLAT" or "NONE"

EditMask: a character code that determines what the user may enter
Refer to Pattern_Field in the wiki for more information.

LiteralMask: contains the initial values that are displayed in the pattern field

### Return type:

An instance of SFDialogs.DialogControl service or Nothing.

### Adibidea:

##### Basic lengoaian

         Set myPatternField = oDlg.CreatePatternField("PatternField1", Array(20, 20, 60, 15), EditMask := "NNLNNLLLLL", LiteralMask := "__.__.2002")

##### Python lengoaian

         myPatternField = dlg.CreatePatternField('PatternField1', (20, 20, 60, 15), EditMask = 'NNLNNLLLLL', LiteralMask = '__.__.2002')

## CreateProgressBar

Creates a new control of type ProgressBar in the current dialog.

### Sintaxia:

svc.CreateProgressBar(ControlName: str, opt Place: any, Border: str = "3D", MinValue: num = 0, MaxValue: num = 100): svc

### Parametroak:

ControlName: the name of the new control. It must not exist yet.

Place: either …

- a Basic Array or Python tuple with 4 elements: (X, Y, width, height)

- a com.sun.star.awt.Rectangle [X, Y, Width, Height] object

All elements are expressed in Map AppFont units.

Border: "3D" (default), "FLAT" or "NONE"

MinValue: the smallest value that can be entered in the control. Default = 0

MaxValue: the largest value that can be entered in the control. Default = 100

### Return type:

An instance of SFDialogs.DialogControl service or Nothing.

### Adibidea:

##### Basic lengoaian

         Set myProgressBar = oDlg.CreateProgressBar("ProgressBar1", Array(20, 20, 60, 15), MaxValue := 1000)

##### Python lengoaian

         myProgressBar = dlg.CreateProgressBar('ProgressBar1', (20, 20, 60, 15), MaxValue = 1000)

## CreateRadioButton

Creates a new control of type RadioButton in the current dialog.

### Sintaxia:

svc.CreateRadioButton(ControlName: str, Place: any, MultiLine: bool = False): svc

### Parametroak:

ControlName: the name of the new control. It must not exist yet.

Place: either …

- a Basic Array or Python tuple with 4 elements: (X, Y, width, height)

- a com.sun.star.awt.Rectangle [X, Y, Width, Height] object

All elements are expressed in Map AppFont units.

MultiLine: When True (default = False), the caption may be displayed on more than one line

### Return type:

An instance of SFDialogs.DialogControl service or Nothing.

### Adibidea:

##### Basic lengoaian

         Set myRadioButton = oDlg.CreateRadioButton("RadioButton1", Array(20, 20, 60, 15), MultiLine := True)

##### Python lengoaian

         myRadioButton = dlg.CreateRadioButton('RadioButton1', (20, 20, 60, 15), MultiLine = True)

## CreateScrollBar

Creates a new control of type ScrollBar in the current dialog.

### Sintaxia:

svc.CreateScrollBar(ControlName: str, Place, Orientation: str, Border: str = "3D", MinValue: num = 0, MaxValue: num = 100): svc

### Parametroak:

ControlName: the name of the new control. It must not exist yet.

Place: either …

- a Basic Array or Python tuple with 4 elements: (X, Y, width, height)

- a com.sun.star.awt.Rectangle [X, Y, Width, Height] object

All elements are expressed in Map AppFont units.

Orientation: for horizontal orientation use "H" or "Horizontal"; for vertical orientation use "V" or "Vertical".

Border: "3D" (default), "FLAT" or "NONE"

MinValue: the smallest value that can be entered in the control. Default = 0

MaxValue: the largest value that can be entered in the control. Default = 100

### Return type:

An instance of SFDialogs.DialogControl service or Nothing.

### Adibidea:

##### Basic lengoaian

         Set myScrollBar = oDlg.CreateScrollBar("ScrollBar1", Array(20, 20, 60, 15), MaxValue := 1000)

##### Python lengoaian

         myScrollBar = dialog.CreateScrollBar('ScrollBar1', (20, 20, 60, 15), MaxValue = 1000)

## CreateTableControl

Creates a new control of type TableControl in the current dialog.

### Sintaxia:

svc.CreateTableControl(ControlName: str, Place: any, Border: str = "3D", RowHeaders: bool = True, ColumnHeaders: bool = True, ScrollBars: str = "N", GridLines: bool = False): svc

### Parametroak:

ControlName: the name of the new control. It must not exist yet.

Place: either …

- a Basic Array or Python tuple with 4 elements: (X, Y, width, height)

- a com.sun.star.awt.Rectangle [X, Y, Width, Height] object

All elements are expressed in Map AppFont units.

Border: "3D" (default), "FLAT" or "NONE"

RowHeaders: when True (default), the row Headers are shown

ColumnHeaders: when True (default), the column Headers are shown

ScrollBars: possible values are: "H" or "Horizontal" (horizontal scrollbars), "V" or "Vertical" (vertical scrollbars); "B" or "Both" (both scrollbars); "N" or "None" (default) for no scrollbars. Scrollbars appear dynamically when they are needed.

GridLines: when True (default = False) horizontal and vertical lines are painted between the grid cells

### Return type:

An instance of SFDialogs.DialogControl service or Nothing.

### Adibidea:

##### Basic lengoaian

         Set myTableControl = oDlg.CreateTableControl("TableControl1", Array(20, 20, 60, 15), ScrollBars := "B")

##### Python lengoaian

         myTableControl = dlg.CreateTableControl('TableControl1', (20, 20, 60, 15), ScrollBars = 'B')

## CreateTabPageContainer

Creates a new control of type TabPageContainer in the current dialog. Tabs are spread over separate lines inside the dialog when necessary. Multiple TabPageContainer are not supported.

TagePageContainer control creation comes always last in a dialog creation.

### Sintaxia:

svc.CreateTabPageContainer(ControlName: str, Place: any, TabHeaders: str[1..*], Border: str = "3D"): svc

### Parametroak:

ControlName: the name of the new control. It must not exist yet.

Place: either …

- a Basic Array or Python tuple with 4 elements: (X, Y, width, height)

- a com.sun.star.awt.Rectangle [X, Y, Width, Height] object

All elements are expressed in Map AppFont units.

TabHeaders: An array of strings defining each individual label for tabs

Border: "3D" (default), "FLAT" or "NONE"

### Return type:

An instance of SFDialogs.DialogControl service or Nothing.

### Adibidea:

##### Basic lengoaian

         Set myTabPageContainer = oDlg.CreateTabPageContainer("someContainer", Array(20, 20, 60, 15), TabHeaders := Array("Modules", "Dialogs", "Libraries"))

##### Python lengoaian

         myTabPageContainer = dlg.CreateTabPageContainer('theTabs', TabHeaders=('Modules', 'Dialogs', 'Libraries'), place=(20, 20, 60, 15))

## CreateTextField

Creates a new control of type TextField in the current dialog.

### Sintaxia:

svc.CreateTextField(ControlName: str, Place: any, Border: str = "3D", MultiLine: bool = False, MaximumLength: num = 0, PasswordCharacter: str = ""): svc

### Parametroak:

ControlName: the name of the new control. It must not exist yet.

Place: either …

- a Basic Array or Python tuple with 4 elements: (X, Y, width, height)

- a com.sun.star.awt.Rectangle [X, Y, Width, Height] object

All elements are expressed in Map AppFont units.

Border: "3D" (default), "FLAT" or "NONE"

MultiLine: When True (default = False), the caption may be displayed on more than one line

MaximumLength: the maximum character count (default = 0 meaning unlimited)

PasswordCharacter: a single character specifying the echo for a password text field (default = "")

### Return type:

An instance of SFDialogs.DialogControl service or Nothing.

### Adibidea:

##### Basic lengoaian

    Set myTextField = oDlg.CreateTextField("TextField1", Array(20, 20, 120, 50), MultiLine := True)

##### Python lengoaian

         myTextField = dlg.CreateTextField('TextField1', (20, 20, 120, 50), MultiLine = True)

## CreateTimeField

Creates a new control of type TimeField in the current dialog.

### Sintaxia:

svc.CreateTimeField(ControlName: str, Place: any, Border: str = "3D", MinTime: num = 0, MaxTime: num = 24): svc

### Parametroak:

ControlName: the name of the new control. It must not exist yet.

Place: either …

- a Basic Array or Python tuple with 4 elements: (X, Y, width, height)

- a com.sun.star.awt.Rectangle [X, Y, Width, Height] object

All elements are expressed in Map AppFont units.

Border: "3D" (default), "FLAT" or "NONE"

MinTime: the smallest time that can be entered in the control. Default = 0

MaxTime: the largest time that can be entered in the control. Default = 24h

### Return type:

An instance of SFDialogs.DialogControl service or Nothing.

### Adibidea:

##### Basic lengoaian

         Set myTimeField = oDlg.CreateTimeField("TimeField1", Array(20, 20, 60, 15))

##### Python lengoaian

         myTimeField = dlog.CreateTimeField('TimeField1', (20, 20, 60, 15))

## CreateTreeControl

Creates a new control of type TreeControl in the current dialog.

### Sintaxia:

svc.CreateTreeControl(ControlName: str, Place: any, Border = "3D"): svc

### Parametroak:

ControlName: the name of the new control. It must not exist yet.

Place: either …

- a Basic Array or Python tuple with 4 elements: (X, Y, width, height)

- a com.sun.star.awt.Rectangle [X, Y, Width, Height] object

All elements are expressed in Map AppFont units.

Border: "3D" (default), "FLAT" or "NONE"

### Return type:

An instance of SFDialogs.DialogControl service or Nothing.

### Adibidea:

##### Basic lengoaian

         Set myTreeControl = oDlg.CreateTreeControl("TreeControl1", Array(20, 20, 60, 15))

##### Python lengoaian

         myTreeControl = dlg.CreateTreeControl('TreeControl1', (20, 20, 60, 15))

## EndExecute

Elkarrizketa-koadro modal baten bistaratzea amaitzen du eta argumentua bueltatzen du uneko Execute() exekuzio-ekintzaren itzulera-balio gisa.

EndExecute() normalean elkarrizketa-koadro batek edo kontrol-gertaera batek abiarazitako makro baten prozesatzean egoten da.

### Sintaxia:

svc.EndExecute(returnvalue: int)

### Parametroak:

returnvalue: Exekutatzen ari den Execute() metodoari pasatutako balioa.

### Adibidea:

##### Basic lengoaian

          Sub OnEvent(poEvent As com.sun.star.lang.EventObject)
              Dim oDlg As Object
              Set oDlg = CreateScriptService("SFDialogs.DialogEvent", poEvent)
              oDlg.EndExecute(ReturnValue := 25)
          End Sub

##### Python lengoaian

         from com.sun.star.lang import EventObject
         def on_event(event: EventObject):
             dlg = CreateScriptService("SFDialogs.DialogEvent", event)
             dlg.EndExecute(25)

Above com.sun.star.lang.EventObject aipamenak aukerakoak dira. Holako oharpenek LibreOffice Application Programming Interface APIa identifikatzen laguntzen dute.

## Execute

Bistaratu elkarrizketa-koadroa eta, modala bada, itxaron erabiltzaileak hura amaitu dezan. Itzulitako balioa hauetako bat da:

- 0 : Utzi botoia sakatu da

- 1 : Ados botoia sakatu da

- Bestela, elkarrizketa-koadro batek edo kontrol-gertaera batek bidalitako EndExecute() instrukzioarekin gelditu den elkarrizketa-koadroa

Modalak ez diren elkarrizketa-koadroen kasuan, metodoak beti 0 itzultzen du eta makroaren exekuzioak aurrera jarraitzen du.

### Sintaxia:

svc.Execute(modal: bool = True): int

### Parametroak:

modal: False elkarrizketa-koadroa ez modala denean. Balio lehenetsia = True.

### Adibidea:

Hurrengo Basic adibidean, myDialog elkarrizketa-koadroa uneko dokumentuaren Standard liburutegian biltegiratzen da.

          Dim oDlg As Object, lReturn As Long
          Set oDlg = CreateScriptService("SFDialogs.Dialog", , , "myDialog")
          lReturn = oDlg.Execute(Modal := False)
          Select Case lReturn
              ' ...
          End Select

Hurrengo Python kodeak Euro Basic liburutegi partekatutik bistaratzen duDlgConvert elkarrizketa-koadro modala.

         dlg = CreateScriptService("SFDialogs.Dialog", 'GlobalScope', 'Euro', "DlgConvert")
         rc = dlg.Execute()
         if rc == dlg.CANCELBUTTON:
             # ...

## GetTextsFromL10N

Elkarrizketa-koadro bateko testu-kate finko guztiak ordezkatzen ditu itzulitako bertsioekin, L10N zerbitzu-instantzia batean oinarrituta. Metodo honek honako kateak itzultzen ditu:

- Elkarrizketa-koadroaren izenburua.

- Epigrafea honako kontrol motetan: botoia, kontrol-laukia, lerro finkoa, testu finkoa, talde-markoa eta aukera-kontrola.

- Kate estatikoak zerrenda-koadroetan eta konbinazio-koadroetan.

- Sagua kontrolaren gainetik igarotzen denean bistaratzen den aholkua eta laguntza-testua.

Metodoak True itzultzen du arrakasta badu.

Elkarrizketa-koadro bateko kateak itzuli ahal izan daitezen, erabili L10N zerbitzuaren AddTextsFromDialog metodoa.

### Sintaxia:

svc.GetTextsFromL10N(l10n: svc): bool

### Parametroak:

l10n: L10N zerbitzuaren instantzia bat, itzuliko diren kateak hortik atzituko dira.

### Adibidea:

Hurrengo adibidean, itzulitako kateak kargatzen dira eta "MyDialog" elkarrizketa-koadroari aplikatzen zaizkio.

##### Basic lengoaian

         oDlg = CreateScriptService("Dialog", "GlobalScope", "Standard", "MyDialog")
         myPO = CreateScriptService("L10N", "/home/user/po_files/")
         oDlg.GetTextsFromL10N(myPO)
         oDlg.Execute()

##### Python lengoaian

         dlg = CreateScriptService("Dialog", "GlobalScope", "Standard", "MyDialog")
         myPO = CreateScriptService("L10N", "/home/user/po_files/")
         dlg.GetTextsFromL10N(myPO)
         dlg.Execute()

Irakurri L10N zerbitzuaren laguntza-orria PO eta POT fitxategiak nola erabiltzen diren ikasteko.

## ImportControl

Import and duplicate an existing control of any type from one dialog to the actual dialog. The duplicated control is left unchanged. The new control can be renamed and relocated. Events handlers, when present, may be imported too.

### Sintaxia:

svc.ImportControl(SourceDialog: svc, SourceName: str, opt ControlName: str, Page: num = 0, OffsetX: num = 0, OffsetY:num = 0, IncludeOnProperties: bool = False): svc

### Parametroak:

SourceDialog: an SFDialogs.Dialog class instance.

SourceName: the name of the control to import.

ControlName: the name of the new control. It must not exist yet. Default is SourceName

Page: the page number of the new control. Default = 0

OffsetX, OffsetY: the number of pixels to add to the source control coordinates in "Map AppFont" units. Default = 0, may be negative.

IncludeOnProperties: include the On... event properties. Default = False.

### Return type:

An instance of SFDialogs.DialogControl service or Nothing.

### Adibidea:

##### Basic lengoaian

         Set mCtrl = oDlg.ImportControl(srceDlg, "someCtrlName")

##### Python lengoaian

         dlg.ImportControl(srceDlg, 'aCtrlName', includeOnProperties=true)

## OrderTabs

Set the tabulation index of a series of controls. The sequence of controls are given as an array of control names from the first to the last.

Controls with an index >= 1 are not accessible with the TAB key if:
- they are omitted from the given list
- their type is FixedLine, GroupBox or ProgressBar
- they are disabled

### Sintaxia:

svc.TabsList(TabsList: num, Start: num = 1, Increment: num = 1): bool

### Parametroak:

TabsList: an array of valid control names in the order of tabulation

Start: the tab index to be assigned to the 1st control in the list. Default = 1

Increment: the difference between 2 successive tab indexes. Default = 1

### Return type:

Returns True when successful.

### Adibidea:

##### Basic lengoaian

         oDlg.OrderTabs(Array("myListBox", "myTextField", "myNumericField"), Start := 10)

##### Python lengoaian

         dlg.OrderTabs(('myListBox', 'myTextField', 'myNumericField'), Start = 10)

## Resize

Moves the topleft corner of a dialog to new coordinates and/or modify its dimensions. All distances are expressed in AppFont units. Without arguments, the method resets the initial dimensions. Return True if the resize was successful.

### Sintaxia:

svc.Resize(opt Left: num, opt Top: num, opt Width: num, opt Height: num): bool

### Parametroak:

Left: Distantzia horizontala goiko ezkerreko izkinatik

Top: Distantzia bertikala goiko ezkerreko izkinatik

Width: Elkarrizketa-koadroa duen laukizuzenaren zabalera

Height: Elkarrizketa-koadroaren edukia duen laukizuzenaren altuera

Missing arguments are left unchanged

### Adibidea:

##### Basic lengoaian

         oDlg.Resize(1000, 2000, Height := 6000) ' Width is not changed

##### Python lengoaian

         dlg.Resize(1000, 2000, Height = 6000)  # Width is not changed

## SetPageManager

Orriz orri ibiltzeko ardura elkarrizketa-koadro bateko zein kontrolek duten definitzen du. Horrela, errazagoa da elkarrizketa-koadro baten eta bere kontrolen Page propietatea kudeatzea.

Elkarrizketa-koadroak orri bat baino gehiago eduki dezake, eta unean ikusgai dagoen orria elkarrizketa-koadroaren Page propietatearen bidez definitzen da. Page propietatea ez bada aldatzen, orri ikusgai lehenetsia 0 (zero) da. Horrek esan nahi du ez dela orri jakin bat definitu eta kontrol ikusgai guztiak bistaratuko direla, beren Page propietatean ezarritako balioari kasu egin gabe.

Elkarrizketa-koadro baten Page propietatea aldatzen bada eta 1, 2, 3 eta abar bezalako balio bat ezartzen bada, orduan Page propietatean uneko elkarrizketa-koadroaren orriarekin bat datorren balioa duten kontrolak soilik bistaratuko dira.

SetPageManager metodoa erabiliz posible da orri-kudeatzaileen lau mota definitzea:

- Zerrenda-koadroa edo konbinazio-koadroa: kasu horretan, zerrenda-koadroko edo konbinazio-koadroko sarrera bakoitza orri bati dagokio. Lehen elementua 1. orrialdeari egingo dio erreferentzia, bigarren elementuak 2. orrialdeari eta abar.

- Aukera-botoien multzoa: ikusgai zein orrialde dagoen kontrolatuko duen aukera-botoien multzo bat definitzen du.

- Sequence of buttons: defines a set of buttons, each of which corresponding to a dialog page. This can be used to emulate a tabbed interface by placing buttons side by side in the dialog.

- Aurrekoa/Hurrengoa botoiak: elkarrizketa-koadroan aurreko/hurrengo orrira joateko erabiliko diren botoiak definitzen ditu.

Posible da orriak kudeatzeko mekanismo bat baino gehiago aldi berean erabiltzea.

Metodo honi behin bakarrik deitu behar zaio Execute metodoari deitu baino lehen. Hurrengo deiei ez ikusiarena egingo zaie.

Ongi gauzatzen bada, metodoak True itzuliko du.

### Sintaxia:

svc.SetPageManager(pilotcontrols: str = "", tabcontrols: str = "", wizardcontrols: str = "", opt lastpage: int): bool

### Parametroak:

pilotcontrols: orri-kudeatzaile gisa erabilitako ListBox, ComboBox edo RadioButton kontrol-izenen zerrenda bat, komaz bereizita. RadioButton motako kontroletan, zehaztu erabiliko den lehen kontrolaren izena.

tabcontrols: orri-kudeatzaile gisa erabiliko diren botoi-izenen zerrenda bat, komaz bereizita. Argumentu honetan zein ordenatan zehazten diren, haiei lotutako orri-zenbakia ordena horretan egokituko zaie.

wizardcontrols: Aurrekoa/Hurrengoa botoi gisa erabiliko diren bi botoien izenak dituen zerrenda bat, komaz bereizitakoa.

lastpage: erabilgarri dagoen azken orriaren zenbakia. Gomendagarria da balio hau zehaztea Aurrekoa/Hurrengoa orri-kudeatzailea erabiltzen denean.

### Adibidea:

Demangun hiru orri dituen elkarrizketa-koadro bat. Koadroak "aPageList" izeneko ListBox kontrol bat du, orri ikusgaia kontrolatzeko erabiliko dena. Horrez gain, "btnPrevious" eta "btnNext" izeneko bi botoi ditu, elkarrizketa-koadroaren Aurreko/Hurrengo botoi gisa erabiliko direnak.

##### Basic lengoaian

        oDlg.SetPageManager(PilotControls := "aPageList", _
                               WizardControls := "btnPrevious,btnNext", _
                               LastPage := 3)
        oDlg.Execute()

##### Python lengoaian

        dlg.SetPageManager(pilotcontrols="aPageList",
                           wizardcontrols="btnPrevious,btnNext",
                           lastpage=3)
        dlg.Execute()

## Terminate

Amaitu Dialog zerbitzua uneko instantziarako. Itzuli True ongi amaitu bada.

### Sintaxia:

svc.Terminate(): bool

### Adibidea:

Beheko Basic eta Python adibideek DlgConsole eta dlgTrace elkarrizketa-koadro ez modalak irekitzen dituzte. ScriptForge eta Access2Base liburutegi partekatuetan biltegiratzen dira, hurrenez hurren. Elkarrizketa-koadroa ixteko botoiak desgaituta daude eta amaitze esplizitua gauzatzen da exekutatzen ari den prozesu baten amaieran.

Hurrengo adibidean, inhibitutako leiho-ixtea DlgConsole elkarrizketa-koadroko botoi batek ordezten du:

##### Basic lengoaian

         oDlg = CreateScriptService("SFDialogs.Dialog","GlobalScope","ScriptForge","DlgConsole")
         oDlg.Execute(modal:=False)
         Wait 5000
         oDlg.Terminate()

##### Python lengoaian

         from time import sleep
         dlg = CreateScriptService('SFDialogs.Dialog',"GlobalScope",'Access2Base',"dlgTrace")
         dlg.Execute(modal=False)
         sleep 5
         dlg.Terminate()

Azpimarraren karaktere bat, "_", aurrizki gisa duten ScriptForge Basic errutina edo identifikatzaile guztiak barneko erabilerarako erreserbatuta daude. Ez dira Basic makroetan edo Python scriptetan erabili behar.

Erlazionatutako gaiak

SFDialogs.DialogControl zerbitzua

ScriptForge.UI zerbitzua