[comp.windows.x] DECWindows list box widget resizing

JONESD@kcgl1.eng.ohio-state.edu (David Jones) (06/22/89)

I'm writing a DECWindows application that uses a list_box widget inside
of an attached dialog box that can be resized.  The problem is that
the visibleItemsCount value is not re-computed automatically on a resize.
Does anyone know of a way to coerce the list_box widget into computing
it's visibleItemsCount based upon it's geometry?  Or, failing that, what's
a good method for having the application compute the appropriate value?


David L. Jones               |      Phone:    (614) 292-6929
Ohio State Unviversity       |      Internet:
1971 Neil Ave. Rm. 406       |               jonesd@kcgl1.eng.ohio-state.edu
Columbus, OH 43210           |               jones-d@eng.ohio-state.edu

Disclaimer: A repudiation of a claim.

reha@cunixc.cc.columbia.edu (Reha Elci) (06/22/89)

Yes, I had the same problem... I think its a bug rather than a feature.
I usually keep visible number really low compared to the number of items
in the list to save grace...

Reha Elci

bolgatz@cb750c.enet.DEC.COM (06/23/89)

The proper way to change the listbox width is through SetValues.  Listbox does 
not support dynamic dimension changes.  Therefore, placing listboxes inside 
attached dialog boxes - with attachments to both the left and right side of 
the adb - may, under certain circumstances, lead to the items selectable area 
not spanning the full width of the listbox.  This is because attached dialog 
boxes dynamically resize their children when the adb changes size.

Also note that the proper way to change the listbox height is through the 
ItemsCount attribute.  Modifying the height attribute will not reconfigure
the number of visible items.  Again, in the case of attached dialog boxes,
doubling the listbox height but not modifying the itemsCount will result 
in a lb only half 'full' of items, the remainiong area left blank.


Dynamic resizing will be added to listbox in DECW V3...

Jay Bolgatz