[Gambas-user] How to use the scrollview control?
francesco.difusco@libero.it
francesco.difusco at ...69...
Sun Sep 19 08:59:40 CEST 2004
> > 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
> >
>
> Ok this sounds better.
>
> What is the purpose of
> INC Scrollview1.ScrollY
>
> In the help:
> INC
> INC Variable
> Increments a variable. Variable can be any target of an assignment, but must
be numeric.
>
> You try her to increment 'Scrollview1.ScrollY'
> Nice if it could but it's not posible.
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.
> 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
Y=Scrollview1.ScrollY
INC Y
Scrollview1.ScrollY=Y
nor
Scrollview1.ScrollY=Scrollview1.ScrollY+1
work
Scrollview1.ScrollY is always set to zero.
Francesco
More information about the User
mailing list