View Issue Details

IDProjectCategoryView StatusLast Update
0014956MMW v4Framework: Scripts/Extensionspublic2022-04-27 17:32
Reporterzvezdan Assigned To 
PrioritynoneSeverityminorReproducibilityunable to reproduce
Status newResolutionopen 
Summary0014956: Problem with MinHeight/MaxHeight properties of Form
DescriptionI made Update Location of Files in Database and Restore/Synchronize Database add-ons to have MinHeight and MaxHeight with the same value, using only MinWidth, which means that I want their dialog boxes to be resizable only horizontally, but not vertically. On my computer it is working as intended, but several users of my add-ons reported the problem with their dialog boxes, which are vertically resizable for them as well. That should not happen because it causes trimming and overlapping of controls on the bottom of the form, but still it is a fact. Unfortunately, I cannot reproduce that and I have no clue why is that is happening.

I have attached screenshots and one video file showing normal and wrong dialog boxes.
Steps To ReproduceOption Explicit

Sub OnStartUp()
    Dim oMenuItem

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

Sub Test(oMenuItem)
    Dim oForm
    Dim lblTest
    Dim btnClose
    Dim btnDialog
    Dim btnMessage

    Set oForm = SDB.UI.NewForm
    With oForm
        With .Common
            .SetRect 100, 100, 350, 140
            .MinWidth = 100
            .MinHeight = 100
        End With
        .BorderStyle = 2 'bsSizeable
        .FormPosition = 4
        .Caption = oMenuItem.Caption
    End With

    Set lblTest = SDB.UI.NewLabel(oForm)
    With lblTest
        .Common.SetRect 10, 10, 300, 17
        .Caption = "This dialog souldn't resize under 100px widht/height"
    End With

    Set btnClose = SDB.UI.NewButton(oForm)
    With btnClose
        .Caption = SDB.Localize("&Close")
        .Common.SetRect 10, 30, 90, 25
        .Cancel = True
        .ModalResult = 2
    End With

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

Activities

zvezdan

2020-06-23 09:55

updater   ~0058634

Ok, I finally found when this happens and, honestly, I don't believe how nobody of you noticed such thing so far. I haven't observed it because I was using MM inside one Win XP virtual machine all the time.

The problem is manifesting with skinned version of the program on Vista and Win7 (which I have tested), an most probably on newer versions of Windows as well.

It is manifesting with all scripts, not only mine. Even your included Stat script has this problem.