View Issue Details

IDProjectCategoryView StatusLast Update
0011639MMW v4Framework: Scripts/Extensionspublic2013-12-20 10:29
Reporterzvezdan Assigned To 
PrioritynoneSeverityminorReproducibilityalways
Status newResolutionopen 
Summary0011639: Mouse cursor set with SDB.CursorType is not consistent
DescriptionIf I change the default mouse cursor, its display depends of the control which is under it. With the skinned version it is correctly displayed when it is over: CheckBox, RadioButton, DropDown, Edit, SpinEdit, TrackBar, Panel and Button.

However, it returns to the default shape when it is over: Form, Label, csDropDownList (non-editable DropDown), ActiveX and maybe something else.

With the non-skinned version it returns to the default shape when it is over: DropDown (editable) and ActiveX.

That should not happen, the application mouse cursor should stay the same whatever control is under the mouse.

Here is the test script:

Option Explicit

Sub OnStartup()
    Dim oMenuItem

    Set oMenuItem = SDB.UI.AddMenuItem(SDB.UI.Menu_Edit, 0, 0)
    oMenuItem.Caption = SDB.Localize("Test Hourglass Cursor")
    oMenuItem.UseScript = Script.ScriptPath
    oMenuItem.OnClickFunc = "Test"
End Sub

Sub Test(oItem)
    Dim oForm
    Dim oCtrl
    Dim btnAppCursor
    Dim btnCancel
    Dim iModalResult

    Set oForm = SDB.UI.NewForm
    oForm.BorderStyle = 3 'bsDialog
    oForm.Common.SetRect 100, 100, 330, 390
    oForm.Caption = SDB.Localize("Test")

    Set oCtrl = SDB.UI.NewLabel(oForm)
    oCtrl.Caption = "Label: Test Hourglass Cursor"
    oCtrl.Common.SetRect 10, 10, 300, 17

    Set oCtrl = SDB.UI.NewCheckBox(oForm)
    oCtrl.Caption = "CheckBox: Test Hourglass Cursor"
    oCtrl.Common.SetRect 10, 40, 300, 17

    Set oCtrl = SDB.UI.NewRadioButton(oForm)
    oCtrl.Caption = "RadioButton: Test Hourglass Cursor"
    oCtrl.Common.SetRect 10, 70, 300, 17

    Set oCtrl = SDB.UI.NewLabel(oForm)
    oCtrl.Caption = "DropDownList:"
    oCtrl.Common.SetRect 10, 103, 80, 17

    Set oCtrl = SDB.UI.NewDropDown(oForm)
    oCtrl.Style = 2 ' csDropDownList
    oCtrl.Common.SetRect 100, 100, 200, 21

    Set oCtrl = SDB.UI.NewLabel(oForm)
    oCtrl.Caption = "DropDown:"
    oCtrl.Common.SetRect 10, 133, 80, 17

    Set oCtrl = SDB.UI.NewDropDown(oForm)
    oCtrl.Common.SetRect 100, 130, 200, 21

    Set oCtrl = SDB.UI.NewLabel(oForm)
    oCtrl.Caption = "Edit:"
    oCtrl.Common.SetRect 10, 163, 80, 17

    Set oCtrl = SDB.UI.NewEdit(oForm)
    oCtrl.Common.SetRect 100, 160, 200, 17

    Set oCtrl = SDB.UI.NewLabel(oForm)
    oCtrl.Caption = "SpinEdit:"
    oCtrl.Common.SetRect 10, 193, 80, 17

    Set oCtrl = SDB.UI.NewSpinEdit(oForm)
    oCtrl.Common.SetRect 100, 190, 200, 19

    Set oCtrl = SDB.UI.NewLabel(oForm)
    oCtrl.Caption = "TrackBar:"
    oCtrl.Common.SetRect 10, 223, 80, 17

    Set oCtrl = SDB.UI.NewTrackBar(oForm)
    oCtrl.Horizontal = True
    oCtrl.Common.SetRect 100, 220, 200, 28

    Set oCtrl = SDB.UI.NewLabel(oForm)
    oCtrl.Caption = "Panel:"
    oCtrl.Common.SetRect 10, 253, 80, 17

    Set oCtrl = SDB.UI.NewPanel(oForm)
    oCtrl.Common.SetRect 100, 250, 200, 20

    Set oCtrl = SDB.UI.NewLabel(oForm)
    oCtrl.Caption = "ActiveX:"
    oCtrl.Common.SetRect 10, 283, 80, 17

    Set oCtrl = SDB.UI.NewActiveX(oForm, "Shell.Explorer")
    oCtrl.Common.SetRect 100, 280, 200, 20

    Set btnAppCursor = SDB.UI.NewButton(oForm)
    btnAppCursor.Common.SetRect 70, 320, 120, 25
    btnAppCursor.Caption = "Set hourglass cursor"
    Script.RegisterEvent btnAppCursor, "OnClick", "btnAppCursor_OnClick"

    Set btnCancel = SDB.UI.NewButton(oForm)
    btnCancel.Caption = SDB.Localize("&Close")
    btnCancel.Common.SetRect 200, 320, 70, 25
    btnCancel.Cancel = True
    btnCancel.ModalResult = 2

    iModalResult = oForm.ShowModal
End Sub

Sub btnAppCursor_OnClick()
    SDB.CursorType = -11
End Sub
TagsNo tags attached.
Fixed in build

Relationships

related to 0006746 feedbackLudek ISDBApplication::CursorType property needed 

Activities

There are no notes attached to this issue.