View Issue Details

IDProjectCategoryView StatusLast Update
0014944MMW v4Framework: Scripts/Extensionspublic2018-07-04 17:43
Reporterzvezdan Assigned To 
PrioritynoneSeverityminorReproducibilityalways
Status newResolutionopen 
Summary0014944: ControlName before SetRect adds an unwanted item to DropBox in non-skinned version
DescriptionIf DropBox.Common.ControlName is executed before SetRect, the non-skinned version of the program will add one unwanted item as the first one to the list with the text that is assigned to the ControlName.
Steps To ReproduceOption Explicit

Sub OnStartUp()
    Dim oMenuItem

    Set oMenuItem = SDB.UI.AddMenuItem(SDB.UI.Menu_File, 0, 0)
    oMenuItem.Caption = "ControlName test"
    oMenuItem.OnClickFunc = "Test"
    oMenuItem.UseScript = Script.ScriptPath
End Sub

Sub Test(oMenuItem)
    Dim oForm
    Dim cboTest
    Dim btnClose
    Dim i

    Set oForm = SDB.UI.NewForm
    oForm.Common.SetRect 100, 100, 337, 110
    oForm.BorderStyle = 3
    oForm.FormPosition = 4
    oForm.Caption = oMenuItem.Caption

    Set cboTest = SDB.UI.NewDropDown(oForm)
    cboTest.Common.ControlName = "BlahBlah"
    cboTest.Common.SetRect 10, 10, 300, 21

    For i = 1 To 5
        cboTest.AddItem i
    Next

    Set btnClose = SDB.UI.NewButton(oForm)
    btnClose.Caption = SDB.Localize("&Close")
    btnClose.Common.SetRect 130, 43, 77, 25
    btnClose.Cancel = True
    btnClose.ModalResult = 2

    oForm.showModal
End Sub
TagsNo tags attached.
Fixed in build

Relationships

related to 0014889 closedLudek (GroupBox|Panel).Common.ControlName displayed as Caption 

Activities

There are no notes attached to this issue.