|
-
Feb 16th, 2010, 08:36 AM
#1
Re: MSFLEXGRID - how to get column number of 1st displayed column?
There is no property for the last row/column, you need to calculate it somehow.
The two main ways are:
- loop from .TopRow to .Rows-1 checking .RowIsVisible() to see when it becomes False - but be careful of rows that are partly visible, as the way RowIsVisible treats it may not be what you expect.
- write your own code to do the equivalent of .RowIsVisible, based on .RowPos and .RowHeight for each of the rows. This takes more work, but you can determine when a row is partly visible, and treat it as you want.
You can't set a property to hide the scrollbar without disabling scrolling, but what you can do is put the grid inside a picturebox, and set the width of the picturebox to the width of the grid minus the width of the scrollbar.
-
Feb 16th, 2010, 09:02 AM
#2
Thread Starter
Hyperactive Member
Re: MSFLEXGRID - how to get column number of 1st displayed column?
Thanks Optional & Si_the_Geek for the advice.
Actually my problem is this:
I want to make the cells editable as in Spreadsheet applications like Excel etc. For this I am diplaying a textbox at the exact position of the selected cell. This creates problems when scrolling if the selected cell goes out of the display.
I have made some modifications based on your suggestions and now it seems to work ok.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|