Window size changes back to original when list items are deleted

This forum is read only. No new submissions are accepted.

Questions about motif? Contact us

2 posts / 0 new
Last post
Window size changes back to original when list items are deleted

 

The user resizes a dialog with a list in it. When the list is emptied and re-populated, the dialog flips back to its original size.

Details:
-------
I've ported an X application from VMS to Solaris 10. I think the version of the Motif library is different and this may account for the problem I'm seeing. I'm using the version of Motif that came with the version of Solaris 10 that was released in October 2008, which I think is Motif 2.1. I've determined this using this command:
> pkginfo -l | grep -i motif
NAME: Motif UIL Compiler
DESC: Motif UIL compiler
NAME: CDE Motif Manuals
DESC: CDE Motif Manuals
NAME: Motif RunTime Kit
DESC: Motif 2.1 libraries, headers, xmbind and bindings
NAME: DPS motif library
DESC: DPS MOTIF library

Here's a set of actions:
1. The user clicks a button and a dialog is opened.
2. The dialog contains a list with many lines in it.
3. The list has 14 visible items in it, but there is a vertical scroll bar which can be used to see them all.
4. The user wants to see more items at a time, so s/he makes the dialog larger.
5. The user selects an item from the list and presses a button.
6. The effect on the GUI of pressing the button is to clear the list (using XmListDeleteAllItems) and repopulate it without the entry that was selected.

On Solaris when the XmListDeleteAllItems is executed, the dialog changes back to its original size with just 14 visible items again. Naturally the users find this annoying.

Can anybody confirm that this behaviour is deliberate, or was it perhaps "corrected" in a later release?
Can anybody suggest a workaround?

Thanks :-)

I don't think this is a porting issue, I think it's more likely a difference in versions of Motif. If I've posted this to the wrong forum, please accept my apologies...

 

 

Before you delete the items,

Before you delete the items, set XmNvisibleItemCount to zero. That will force the list to recompute and save the current visible item count.

However, why are you deleting all items, then adding back all but the one that was selected? Why not just delete the selected item?
--
Fred K