[Gambas-user] Example of scrollArea
Benoît Minisini
gambas at ...1...
Sat Apr 12 21:36:26 CEST 2014
Le 12/04/2014 21:13, Julio Sanchez a écrit :
> Hello
> I would like to see an example of ScrollArea, I think the IconView control
> is done with it. (
> http://gambas.8142.n7.nabble.com/DrawArea-vs-ScrollArea-td10261.html )
> I can not find the source code of this control
> Can you tell me where to find it?
>
> Regards
>
> Jsbsan
The ScrollArea sources are in the 'gb.gui.base' component project in
'/comp/src'.
A simpler example of its use is the ImageView control located in 'gb.form'.
You use the ScrollArea exactly like the DrawingArea, except that:
1) You must define the contents size with the ResizeContents() method.
2) You must take the vaue of ScrollX and ScrollY properties into account
when drawing inside the Draw event handler (at least for things that
must move with the scrollbars).
3) A ScrollArea has no "Cached" property. You must implement the Draw
event handler.
4) You have a "Shadow" property if you want to draw nice shadows on
borders where scrolling is possible.
Regards,
--
Benoît Minisini
More information about the User
mailing list