Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
160
Reduce UltraWinGrid header height
posted

I am using UltraWinGrid v7.1 and have a grid with two bands.  On the second band I want the column headers to be much skinnier (by skinnier I mean have less height).  I made the font size smaller on the column headers of this band and that did reduce the height of the header somewhat.  However, there is still quite a bit of padding around the header text that I would ideally like to remove.  I attempted to use the rowlayout properties to change the labelsize but it does not allow me to make it any skinnier than it already is.  Seems like there is a minimum height that cannot be changed as determined by the font.  Am I missing something or is there some other way to reduce the height of the header?  Thanks!

Parents
No Data
Reply
  • 160
    posted

    Here is a code snippet of my unsuccessful attempt at changing it through the rowlayout in case I'm doing something wrong here...

     

    grid.DisplayLayout.Bands[1].UseRowLayout = true;
    grid.DisplayLayout.Bands[1].Override.AllowRowLayoutLabelSizing = RowLayoutSizing.Both;
    grid.DisplayLayout.Bands[1].Columns[0].RowLayoutColumnInfo.MinimumLabelSize = new Size(1, 1);
    grid.DisplayLayout.Bands[1].Columns[0].RowLayoutColumnInfo.PreferredLabelSize = new Size(118, 15);
    grid.DisplayLayout.Bands[1].Columns[0].RowLayoutColumnInfo.ActualLabelSize = new Size(118, 15);

     
    Even after the last line is executed the ActualLabelSize is not 118x15 but rather the larger value that it defaults to if I didn't set it at all. 

Children