I would like to set the column width (of a column in a data window grid) using the properties tab, but the width property is disabled; forcing me to use the mouse to drag to an approximate size.
Why is the width disabled, and can this be fixed or worked around?
The columns defined by the grid lines in a Grid DataWindow are a function of the presentation style. Other objects besides the data column objects may be associated with each grid column, such as Header text objects or computed field objects in the Summary or Footer bands, so the X and Width properties of all these objects depends on the display properties of all the other objects in same or previous grid columns. The X and Width properties are disabled on these objects in the DataWindow Painter because these values are recalculated each time the Datawindow is opened in the painter.
If you wanted to set a column to a specific width you could edit the source code of the Datawindow and set the width of the data column object in the Detail band to the desired value. This should set the grid column to that width 99% of the time but it will be recalculated to the nearest PowerBuilder Unit (or whatever Unit you are using for your DataWindows) the next time the Datawindow is opened in the painter.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.