Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » Draw, Display, Images, Bitmaps, Icons » How to display an icon on the right side of a label/button
Re: How to display an icon on the right side of a label/button [message #3897 is a reply to message #3895] Fri, 07 July 2006 01:32 Go to previous messageGo to previous message
fudadmin is currently offline  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 Smile
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
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: how to #define/#include correctly the .iml file
Next Topic: How to Draw a couple of lines over an ArrayCtrl
Goto Forum:
  


Current Time: Tue Jul 15 11:39:33 CEST 2025

Total time taken to generate the page: 0.03566 seconds