Gulaalaa Qaaqicha keessaa Too'annootaaf Fakkeenyoota Saganteessuu

Contents
Index 🔎︎

# Programming Examples for Controls in the Dialog Editor

Fakkeenyootii armaan gadii qaaqa haaraadhaaf "Qaaqa1" jedhamee waamama. Gulaalaa qaaqa keessatti qaaqa uumuu fi too'annoota armaan gadii ida'uuf meeshaalee kabala SaanduqaMeeshaa irraa fayyadami: Sanduuqii-filannoo "Sanduuqii-filannoo1" jedhamee waamama, Dirree Moggaasaa "Moggaasa1" jedhamee waamama, Qabduu "QabduuAjajaa1" jedhamee waamama, fi Saanduqa Tarree ammoo "SaanduqaTarree1" jedhameetu waamama.

Jijjiirama wantaa tokkotti yammuu too'annaa tokko miiltessituu, Qubeen, qubee guddaa fi qubee xixiqqaan wal-fakkeessuu qabda.

### Qaaqawwan Fe'uuf Dalaga Giloobaalii

    Function LoadDialog(Libname as String, DialogName as String, Optional oLibContainer)
    Dim oLib as Object ' com.sun.star.script.XLibraryContainer
    Dim oLibDialog as Object
    Dim oRuntimeDialog as Object
        If IsMissing(oLibContainer) Then
            oLibContainer = DialogLibraries
        End If
        oLibContainer.LoadLibrary(LibName)
        oLib = oLibContainer.GetByName(Libname)
        oLibDialog = oLib.GetByName(DialogName)
        oRuntimeDialog = CreateUnoDialog(oLibDialog)
        LoadDialog() = oRuntimeDialog
    End Function

LoadDialog function is stored in Tools.ModuleControls available from Application Macros and Dialogs.

### Qaaqa tokko agarsiissuu

    rem global definition of variables
    Dim oDialog1 AS Object
    Sub StartDialog1
        With GlobalScope.BasicLibraries
           If Not .IsLibraryLoaded("Tools") Then .LoadLibrary("Tools")
        End With
        oDialog1 = Tools.ModuleControls.LoadDialog("Standard", "Dialog1")
        oDialog1.Execute()
    End Sub

### Saganticha keessaa kan Too'annaawwanii Dubbisi ykn Gulaali

    Sub Sample1
        With GlobalScope.Basiclibraries
           If Not .IsLibraryLoaded("Tools") Then .LoadLibrary("Tools")
        End With
        oDialog1 = Tools.LoadDialog("Standard", "Dialog1")
        Ilaallata qaaqaa REM argadhu
        oDialog1Model = oDialog1.Model
        REM display text of Label1
        oLabel1 = oDialog1.GetControl("Label1")
        MsgBox oLabel1.Text
        Moggaasa1 too'annaadhaaf barruu haaraa REM qindeessi
        oLabel1.Text = "New Files"
        Haalojii1 too'annaadhaaf amaloota ilaallata REM agarsiisi
        oCheckBox1Model = oDialog1Model.CheckBox1
        MsgBox oCheckBox1Model.Dbg_Properties
        Haalojii1 too'annaadhaaf ilaallata haalaa haaraa REM qindeessi
        oCheckBox1Model.State = 1
        QabduuAjaja1 too'annaadhaaf amaloota ilaallata REM agarsiisi
        oCMD1Model = oDialog1Model.CommandButton1
        MsgBox oCMD1Model.Dbg_Properties
        QabduuAjaja1 too'annaadhaaf amaloota REM agarsiisi
        oCMD1 = oDialog1.GetControl("CommandButton1")
        MsgBox oCMD1.Dbg_Properties
        Qaaqa REM raawwadhu
        oDialog1.Execute()
    End Sub

### SaanduqaTarree tokkotti Galfata ida'i

    Sub AddEntry
        With GlobalScope.Basiclibraries
           If Not .IsLibraryLoaded("Tools") Then .LoadLibrary("Tools")
        End With
        oDialog1 = ModuleControls.LoadDialog("Standard", "Dialog1")
        REM galfata haaraa tokko SaanduqaTarreetti ida'a
        oDialog1Model = oDialog1.Model
        oListBox = oDialog1.GetControl("ListBox1")
        Dim iCount as integer
        iCount = oListbox.ItemCount
        oListbox.additem("New Item" & iCount,0)
    End Sub

### Galfata SaanduqaTarree tokko irraa haqi

    Sub RemoveEntry
        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")
        oListbox.removeitems(0,1)
    End Sub

Matadureewwan Walfakkatan

Amaloota too'annoota Qaaqa Gulaalaa keessaa jijjiiruu

Qaaqa Bu'uuraa uumu

Gulaalaa Qaaqaa keessaatti Too'annoota uumuu

Opening a Dialog With Basic