[Widgetry] small resizer problem

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Widgetry] small resizer problem

Maarten Mostert-2
Hi,

I have another small problem with resizers (in this otherwise highly appreciated GUI framework).

I have a label in a form which is supposed to look like this and risze with the list.




As it didn't resize I played around with it and actually when it starts to be inside the frame of the resizer it does move but not completely and looks something like this:





Notice that any invalidation will reposition my label correctly so this must be very minor.


My source is as follows:


createOrganisationFormWidget: anOrgTreeView resourceWidget: aResourceList id: OrganisationFormID
    | form resizer organisationLabel resourceLabel |
    form := Widgetry.Form new.
    form frame: ((Widgetry.FractionalFrame
                fractionLeft: 0.2
                right: 1
                top: 0
                bottom: 0.2)
                leftOffset: 2;
                rightOffset: 0;
                bottomOffset: -2;
                topOffset: 0).
    form id: OrganisationFormID.
    organisationLabel := Widgetry.DisplayLabel string: 'Organisation'.
    organisationLabel frame: (Widgetry.FractionalFrame
                offsetLeft: 2
                right: 100
                top: 2
                bottom: 17).    "to correct"
    form addComponent: organisationLabel.
    anOrgTreeView frame: ((Widgetry.FractionalFrame
                fractionLeft: 0
                right: 0.5
                top: 0
                bottom: 1)
                leftOffset: 0;
                rightOffset: -2;
                topOffset: 20).
    anOrgTreeView verticalScrollbar: true.
    anOrgTreeView beMultiSelect.
    anOrgTreeView showImages: false.
    anOrgTreeView id: #anOrgTreeViewID.
    anOrgTreeView tree: organisationTreeModel.
    form addComponent: anOrgTreeView.

"    resourceLabel := Widgetry.DisplayLabel string: 'Resources'.
    resourceLabel frame: ((Widgetry.FractionalFrame
                fractionLeft: 0.5
                right: 1
                top: 0
                bottom: 1)
            leftOffset: 2;
                topOffset: 2;
                bottomOffset: 17;
                rightOffset: 0).
    resourceLabel id: #resourceLabelID.
    form addComponent: resourceLabel."

    resourceLabel := Widgetry.DisplayLabel string: 'Resources'.
    resourceLabel frame: ((Widgetry.FractionalFrame
                fractionLeft: 0.5
                right: 1
                top: 0
                bottom: 1)
                leftOffset: 2;
                topOffset: 10; "<<<<<====== Here it goes wrong "
                rightOffset: 0).
    resourceLabel id: #resourceLabelID.
    form addComponent: resourceLabel.



"    aResourceList frame: ((Widgetry.FractionalFrame
                fractionLeft: 0.5
                right: 1
                top: 0
                bottom: 1)
                leftOffset: 2;
                topOffset: 20;
                rightOffset: 0).
    aResourceList id: #aResourceListID.
    form addComponent: aResourceList."
    resizer := ResizingSplitter new.
    resizer beVertical.
    resizer raisedBorder: true.
    resizer frame: (FractionalFrame
                fractionLeft: 0.5
                right: 0.5
                top: 0
                bottom: 1).
    (resizer frame)
        leftOffset: -2;
        topOffset: 20;
        rightOffset: 2.
    resizer aboveLeftWidgets: #(#anOrgTreeViewID).
    resizer belowRightWidgets: #(#resourceLabelID #aResourceListID).
    resizer id: #organisationFormResizerID.
    form addComponent: resizer.
    ^form

@+Maarten,


Reply | Threaded
Open this post in threaded view
|

Re: [Widgetry] small resizer problem

Samuel S. Shuster <sames@interaccess.com>
Maarten,

>Notice that any invalidation will reposition my label correctly so this must be very minor.

I will look into this. Thanks!

                                And So It Goes
                                     Sames
______________________________________________________________________

Samuel S. Shuster [|]
VisualWorks Engineering, GUI Project
Smalltalk Enables Success -- What Are YOU Using?

Reply | Threaded
Open this post in threaded view
|

Re: [Widgetry] small resizer problem

Samuel S. Shuster <sames@interaccess.com>
In reply to this post by Maarten Mostert-2
Maarten,

>Notice that any invalidation will reposition my label correctly so this must be very minor.

Attached is an UNREVIEWED fix for your problem.

                                And So It Goes
                                     Sames
______________________________________________________________________

Samuel S. Shuster [|]
VisualWorks Engineering, GUI Project
Smalltalk Enables Success -- What Are YOU Using?

AR52799.st (3K) Download Attachment