XmATTACHWIDGET oddity

18 views
Skip to first unread message

Richard Sargent

unread,
Jun 5, 2026, 5:14:29 PM (2 days ago) Jun 5
to VAST Community Forum
I am building a browser extension to add a tab to the notebook in a class hierarchy browser.
That's the easy part, even though the browser is not designed to facilitate that.
Fortunately, the Version History Graph provides an example of that and I was fairly easily able to add my new tab.

The problem is when I am laying out the GUI on that tab, XmATTACHWIDGET that should attach two forms seems to behave unexpectedly and I don't understand why. I have done a lot of forms layouts in ABT with all sorts of relative arrangements and it always worked as I expected.

An inspect shows me this for an upper form with a lower form.
CwForm(AttributeGeneralInformationSubcanvas x:0 y:0  w:320 h:101)
CwForm(PolicySpecificSubcanvas x:0 y:0  w:615 h:221)

These are the top* properties of the lower form. It clearly attaches to the upper form.
3
CwForm(AttributeGeneralInformationSubcanvas x:0 y:0  w:320 h:101)
0
0

The code to position the lower form is:
policySpecificSubcanvasForm
setValuesBlock:
[:w |
w
topAttachment: XmATTACHWIDGET;
topWidget: attributeGeneralInformationSubcanvasForm;
topOffset: 0;

leftAttachment: XmATTACHFORM;
bottomAttachment: XmATTACHFORM;
rightAttachment: XmATTACHFORM];
manageChild.

Everywhere I have attached to widgets, top has attached to the bottom of the referenced widget.

Yet, the lower form does have the correct height (and width), but its position is just plain wrong. At least, wrong according to my definition of wrong.

Does anyone have an idea of what might be going wrong? The fact that the ABT tools "get it right" and "all the browser windows get it right" has me thinking I have made an error, but I have no idea what that error could be.

Thanks,
Richard

Wayne Johnston

unread,
Jun 5, 2026, 5:25:00 PM (2 days ago) Jun 5
to VAST Community Forum
I am ignorant on this, but it does sound like perhaps the monitor's scaling isn't 100%, and you need to update something per HiDPI?

Richard Sargent

unread,
Jun 5, 2026, 6:41:53 PM (2 days ago) Jun 5
to VAST Community Forum
I experimented with a hack that did "solve" the problem. I created a fixed position sash where I wanted the two forms to meet and set its position in the creation expression (createWidget:parent:argBlock:), then attached both the upper and lower forms to the sash. Lo and behold! The forms were the correct size and placement.

That doesn't explain what went wrong, of course. It just hides it without explanation and with a touch of voodoo. I hate both.
Reply all
Reply to author
Forward
0 new messages