Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

MSFlexgrid Scrolling

15 views
Skip to first unread message

John Simpson

unread,
Nov 18, 2009, 4:42:56 PM11/18/09
to
I have an application that overlays text boxes on a flexgrid for data entry.
The user clicks on the first empty row and enters data. Then the data
is written to the grid row This is fine until the grid goes past the bottom
of the grid. Then things get messy and no more entry is allowed by
the control because the calculated row position is beyond the lower
edge of the control. (Does that make sense to anyone?)

What I want to do is, at this bottom point, is to scroll the grid up so
that the next empty row is on the bottom grid row, and have the
scrolling continue until data entry is complete.

Positioning the text boxes on the bottom row may not be a problem,
but I've played around with the .RowSel method and the grid_Scroll sub,
but I can't get the scrolling to work. What am I not doing right?

I hope I've explained this in a semi-lucid fashion. Has anyone have any
ideas?

TIA

Old and tired and about to be 72 John


__________ Information from ESET Smart Security, version of virus signature database 4620 (20091118) __________

The message was checked by ESET Smart Security.

http://www.eset.com

Jimekus

unread,
Nov 18, 2009, 5:28:41 PM11/18/09
to

Besides the fact that it isn't easy to get the mouse wheel to work on
unsupported Microsoft products, for other types of scrolling, I use
the following:-

Private Sub Table_Scroll()
With Me.Table
If .row > Zero And .row < .Rows - One And .col > Zero And .col
< .Cols - One Then
If .RowIsVisible(.row - One) = False Or .RowIsVisible
(.row) = False Or .RowIsVisible(.row + One) = False Or .ColIsVisible
(.col) = False Or .ColIsVisible(.col + One) = False Or .ColIsVisible
(.col - One) = False Then
If .RowIsVisible(.row - One) = False Or .RowIsVisible
(.row) = False Or .RowIsVisible(.row + One) = False Then
Me.TextEntry.Top = .Height + .Top
End If
If .ColIsVisible(.col) = False Or .ColIsVisible(.col +
One) = False Or .ColIsVisible(.col - One) = False Then
Me.TextEntry.Left = .Left
End If
Else
Me.TextEntry.Top = .CellTop + .Top
Me.TextEntry.Left = .CellLeft + .Left
End If
End If
End With
End Sub

John Simpson

unread,
Nov 18, 2009, 5:36:44 PM11/18/09
to

"Jimekus" <jim...@gmail.com> wrote in message
news:8a1ec6d4-c4a4-4a44...@y28g2000prd.googlegroups.com...

HOLY SHIT!

Phil Hunt

unread,
Nov 18, 2009, 10:00:18 PM11/18/09
to
I did something similar. I don't exactly know what you are stucked. I just
want to say scrolling is done by +/- the TopRow property. You know you are
at the top orbottom when the TopRow stay at the same value even after you
add/minus 1.

Also there is situation IsVisible property is unreliable when the edge of
the row is at the threshold.


"Jimekus" <jim...@gmail.com> wrote in message
news:8a1ec6d4-c4a4-4a44...@y28g2000prd.googlegroups.com...

Andy

unread,
Nov 19, 2009, 2:45:27 AM11/19/09
to
You could check out iGrid, http://www.10tec.com/home/Products/ActiveX/iGrid/index.aspx.

This supports data entry and gives you quite a bit of control over it.
It handles most things by default, but if needs be gives you hooks
into pretty much everything. Also, its well supported.

On 19 Nov, 03:00, "Phil Hunt" <phung1...@hotmail.com> wrote:
> I did something similar. I don't exactly know what you are stucked. I just
> want to say scrolling is done by +/-  the TopRow property. You know you are
> at the top orbottom when the TopRow stay at the same value even after you
> add/minus 1.
>
> Also there is situation  IsVisible property is unreliable when the edge of
> the row is at the threshold.
>

> "Jimekus" <jime...@gmail.com> wrote in message

John Simpson

unread,
Nov 20, 2009, 3:31:53 PM11/20/09
to

"Andy" <andy...@gb.schneider-electric.com> wrote in message
news:e7a5fde7-05cc-4fcf...@o10g2000yqa.googlegroups.com...

This supports data entry and gives you quite a bit of control over it.
It handles most things by default, but if needs be gives you hooks
into pretty much everything. Also, its well supported.

<Snip>

Too late for this project, but I'll give it a look.

Thanks for the info.


__________ Information from ESET Smart Security, version of virus signature database 4625 (20091120) __________

John Simpson

unread,
Nov 20, 2009, 3:30:06 PM11/20/09
to

"Phil Hunt" <phun...@hotmail.com> wrote in message
news:%23aFJtRM...@TK2MSFTNGP04.phx.gbl...

>I did something similar. I don't exactly know what you are stucked. I just
>want to say scrolling is done by +/- the TopRow property. You know you are
>at the top orbottom when the TopRow stay at the same value even after you
>add/minus 1.
>
> Also there is situation IsVisible property is unreliable when the edge of
> the row is at the threshold.
>

Snip

Thanks. I was unfamiliar with .TopRow. That did the job.


__________ Information from ESET Smart Security, version of virus signature database 4625 (20091120) __________

0 new messages