fudadmin Messages: 1321 Registered: November 2005 Location: Kaunas, Lithuania
Ultimate Contributor Administrator
Very primitive explanation about Paint and deriving.
Luigi, imagine every widget as consisting of 2 parts:
1. ala Database and functions (methods).
2. Paint
Paint creates parts of the widget on the screen. That means, if you make your derived widget (you can do it, can't you?) with Paint method, in your new widget class you can output to the screen anything you want. As an example I'd suggest to have a look once again at my OptionImage example which you already have succesfully used.
Then
1. copy it with a new name, say CellButton
2. change it to be derived from Button ( :public Button)
3. comment/remove all except Paint
4. copy from Button.cpp Paint( all lines and paste over into your Paint
5. Below DrawLabel dl; add a new line
dl.align = ALIGN_RIGHT