View Issue Details

IDProjectCategoryView StatusLast Update
0011261MMW v4Framework: Scripts/Extensionspublic2013-09-11 16:20
Reporterzvezdan Assigned To 
PrioritynoneSeverityminorReproducibilityalways
Status newResolutionopen 
Summary0011261: ISDBUIDropDown::DeleteItem leaves empty rows in skinned list
DescriptionIf skinned dropdown list contains more than 8 items, i.e. if it has displayed vertical scroll bar, after applied DeleteItem method the dropped list would have empty area on its bottom instead of removed rows. This is not happening with non-skinned version. Here is the test script:

Option Explicit

Sub OnStartUp()
    Dim oMenuItem

    Set oMenuItem = SDB.UI.AddMenuItem(SDB.UI.Menu_Edit, 0, 0)
    oMenuItem.Caption = "Remove dropdown item"
    oMenuItem.OnClickFunc = "Test"
    oMenuItem.UseScript = Script.ScriptPath
End Sub

Dim cboTest
Dim btnTest

Sub Test(oMenuItem)
    Dim oForm, i

    Set oForm = SDB.UI.NewForm
    oForm.Common.SetRect 100, 100, 500, 200
    oForm.BorderStyle = 3
    oForm.FormPosition = 4
    oForm.Caption = "Remove dropdown item"

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

    For i = 0 To 20
        cboTest.AddItem i
    Next
    cboTest.ItemIndex = 20

    Set btnTest = SDB.UI.NewButton(oForm)
    btnTest.Caption = "Remove"
    btnTest.Common.SetRect 10, 50, 80, 22
    Script.RegisterEvent btnTest, "OnClick", "btnTest_OnClick"

    oForm.showModal
End Sub

Sub btnTest_OnClick()
    cboTest.DeleteItem cboTest.ItemCount - 1
    cboTest.ItemIndex = cboTest.ItemCount - 1
End Sub
Steps To Reproduce- Copy script to Auto folder and restart program;
- choose "Remove dropdown item" from Edit menu;
- expand dropdown just to make sure that the last row is on the bottom of list;
- collapse dropdown;
- click on Remove button;
- expand dropdown -> on the bottom of the list is empty row;
- click on the bottom arrow button of the scroll bar -> the dropped list will remove empty row.
TagsNo tags attached.
Fixed in build

Activities

There are no notes attached to this issue.