Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - BestFit doesn't work if Resizable=False
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

BestFit doesn't work if Resizable=False

 Post Reply Post Reply
Author
Message
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1354
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Topic: BestFit doesn't work if Resizable=False
    Posted: 22 March 2008 at 11:43pm
Hi,

I want to prevent the columns of a ReportControl from being resized by the user, but would like to automatically set the size of the column to show the entire contents of each column.

If I set the Resizable property to False, then the BestFit method doesn't seem to do anything, however if Resizable = True then BestFit resizes the column to the correct width (but then the user can resize the column unfortunately).

As a side note, a useful addition to the BestFit method would be an optional ExtraSpace parameter, so that you can automatically add an arbitrary number of pixels to the BestFit calculation.

Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1354
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 25 March 2008 at 9:53am
This behaviour seems to have changed in v12, but it still doesn't work. If the Resizable property for all of the columns is False, and then BestFit is called, the first column takes up the entire width of the ReportControl and the rest of the columns cannot be seen.

I think that BestFit should work the same regardless of whether the column is resizable by the user or not. Unless the intention of Resizable is to *both* the user and code from resizing a column (in which case BestFit should do nothing, and an AllowResize property should be available that prevents the user from resizing columns, but allows code to resize columns).
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1354
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 25 March 2008 at 10:28am
Actually, it seems that BestFit just doesn't do anything on columns with  Resizable = False.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.172 seconds.