[Gambas-user] How to use the scrollview control?

ron ronstk at ...239...
Sun Sep 19 16:57:48 CEST 2004


On Sunday 19 September 2004 08:59, francesco.difusco at ...69... wrote:
> 
> > > I am getting crazy about it, I have been looking for the code inside out, all
> > > the properties, but nothing. SOmething strange happens when I do 
> > > 
> > > INC Scrollview1.ScrollY
> > > Y=Scrollview1.ScrollY
> > > 
> > 
---8<---

> 
> 
> Well, I have taken it from tha DataReportExample, from the FABout form:
> 
> PUBLIC SUB timAuthor_Timer()
>   DIM Y AS Integer
>   Y = svwAuthor.ScrollY
>   INC svwAuthor.ScrollY
>   IF Y = svwAuthor.ScrollY THEN svwAuthor.ScrollY = 0
> END
> 
> 
> > Do you understand 'Variable can be any target of an assignment' ?
> Yes, I do.

Sorry, it shows up I have missed something in my education :=(

> 
> > An assignment is something like ' mystring = "mytextforstring"
> > Here it should nummeric like 'myinterger = 123'
> > Despite Scrollview1.ScrollY is a target, it is not an assignmetnt in that way.
> > 
> >  Scrollview1.ScrollY = Scrollview1.ScrollY + 1
> > 
> > should work.
> 
> It is the same I believe, but neither INC  Scrollview1.ScrollY nor the istructions
> 

You may punish me, I didn't know it could do it on controls to


> Y=Scrollview1.ScrollY
> INC Y
> Scrollview1.ScrollY=Y
> 
> nor 
> 
> Scrollview1.ScrollY=Scrollview1.ScrollY+1
> 
> work
> 
> Scrollview1.ScrollY is always set to zero.
> 
> Francesco
> 
> 
You have a strange problem.
I copied the code from here to an old project, add the controls and it worked.

There must be something else in your project doing the set to zero.
Then we need the at least the code or better the project in our crystal ball.






More information about the User mailing list