ScriptSpot

Forum topic · General Scripting

animate the position of the button according to the scrolling inside datagrid!

By artrender.info · 2013-04-06

Description

Hi! My question is, how can I detect the position of the scroll bar, so that when I scrool down my buttons would react to the corect position of the lines, so that at the top they would dissapear!

Attachments
Comments (8)

yessssssss

artrender.info · 2013-04-08

I've found

VisibleRowsCount = (BitmapLister.table.Height-24)/30

Hint

artrender.info · 2013-04-08

intRows = dataGridView1.Rows.GetRowCount(DataGridViewElementStates.Displayed);
intBottom = intRows + intTop - 1;


BitmapLister.table.Rows.GetRowCount(DataGridViewElementStates.Displayed)

is giving error also

one more idea

artrender.info · 2013-04-08



on table Scroll ScrollChangedEventArgs e do
(

	print first visible row index
	print last visible row index	

)

I've found some extra info! How to implement it in maxscript?

artrender.info · 2013-04-08

--on table SelectionChanged senderArg arg do

on table Scroll ScrollViewer.ScrollChanged ScrollChangedEventArgs

private void cbdg1_ScrollChanged(object sender, ScrollChangedEventArgs e)
{
double d = e.VerticalOffset;

// Here you can use the vertical-offset's value.
}

I think i know how to do it, but your help is needed!

artrender.info · 2013-04-08

Look! Let, say, I have the line order, and 30 px for every line!
I just need a callback which detects that datagrid is scrolling items! and during this scrolling we need to detect just which lines are visible! Everything else I will try by myself!

tell me please!

artrender.info · 2013-04-08

tell me please at least where to search?
The height of a row is 30px! may be to detect smth like which line is visible!