grid ctrl scroll 
Author Message
 grid ctrl scroll

Hi!

I have a grid control placed on a form and when I display a "long" string,
I'd like to scroll in order to see the whole string. However, it seems that
if I press the scrollbar, ONLY the columns are scrolled. Therefore, I can
never see the rest of the string.
How can I manipulate the scrollbar or the grid in order to change the way of
scrolling so that I can use the scrollbar to see the whole string?

Thanks,

Francois



Tue, 18 Jan 2005 23:38:56 GMT  
 grid ctrl scroll

Quote:
> Hi!

> I have a grid control placed on a form and when I display a "long" string,
> I'd like to scroll in order to see the whole string. However, it seems
that
> if I press the scrollbar, ONLY the columns are scrolled. Therefore, I can
> never see the rest of the string.
> How can I manipulate the scrollbar or the grid in order to change the way
of
> scrolling so that I can use the scrollbar to see the whole string?

You can't!

What you CAN do is to find out how much the text fills and either assign
more lines to the grid cell or just widen the cell.
You can also put a text field on your form, and show the whole text there
when you click the cell.

For item 1, here is how I do it:

I create a hidden text box on the form and set it to auto size and no wrap.
I can then insert the text into the text box and read its length from the
width property.
In my case, I use this width info to check if I should heighten the grid
row. In your case, you could change the column width.

If, however, your cell gets too wide for the screen, I think you have to use
the multi-line approach.

Keld Laursen



Tue, 18 Jan 2005 15:32:02 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Grid OCX or Scrolling multiple grids - Help

2. HOW CAN I DISABLE CTRL+X, CTRL+V,CTRL+C

3. HOW CAN I DISABLE Ctrl+C,Ctrl+V,Ctrl+X

4. remove scroll bar from the web ctrl

5. Custom Ctrl: Grid with combo?

6. CTRL-Click in Grid???

7. Data Grid - Scroll Bar

8. Scroll Grid Property

9. Screen resolution, grid scrolling

10. fetching data using a grid vertical scroll bar

11. Check boxes need to follow scrolling of DB Grid (VB 4.0-16 bit)

12. Grid scroll bar question

 

 
Powered by phpBB® Forum Software