Page 1 of 1

Simplegraph scroll

PostPosted: September 14th, 2012, 5:44 pm
by glabz74
how to scroll semplegraph by your own scrollbar (i've use alphacontrols component) ?

Re: Simplegraph scroll

PostPosted: September 15th, 2012, 8:50 am
by glabz74
i made VertScrollBar and HorzScrollBar unvisitable in simplegraph properties
then in FormCreate add
Code: Select all
    sskinscrollbar1.PageSize:=SimpleGraph.HorzScrollBar.size;               
    sskinscrollbar2.PageSize:=SimpleGraph.VertScrollBar.Size;


and procedure sSkinScrollBar1Change

SimpleGraph.scrollby(0, sskinscrollbar1.position)

scroll dose not work wen VertScrollBar and HorzScrollBar unvisitable

may be you have got some hit ? ](*,) ](*,) ](*,) ](*,) ](*,)

Re: Simplegraph scroll

PostPosted: September 15th, 2012, 3:35 pm
by Kambiz
It wouldn't be easy. SimpleGraph uses its own ScrollBar class to consider zoom factor. In lot of parts of the code, that class is engaged to calculate the viewport.

Re: Simplegraph scroll

PostPosted: September 15th, 2012, 6:51 pm
by glabz74
I know, i'd been working on it all day, but no luck.. Could you tell from what point i must start ? [-o< I've made a lot of cool skin, and standard scrollbar looks too terribly, i really need to improve it. ](*,)
i try to change HorzScrollBar.position when it invisible with change my own scrollbar.position, but again no luck

Re: Simplegraph scroll

PostPosted: September 16th, 2012, 9:32 am
by Kambiz
The best thing is to study SG code first.
SG scrollbars are managed by TGraphScrollBar instances, however the scrollbar controls are part of SG window (not separate controls).