[Gtk-sharp-list] Drawing colored text and images into listbox or textview, like I do with GDI+ for System.Windows.Forms

Timothy Parez timothyparez@linux.be
Fri, 25 Mar 2005 18:44:38 +0100


Looks good,

But I'll steed need custom drawing capabilities for specific stuff.

-----Oorspronkelijk bericht-----
Van: Rafael Teixeira [mailto:monoman@gmail.com] 
Verzonden: vrijdag 25 maart 2005 18:38
Aan: Timothy Parez
CC: gtk-sharp-list@lists.ximian.com
Onderwerp: Re: [Gtk-sharp-list] Drawing colored text and images into listbox
or textview, like I do with GDI+ for System.Windows.Forms

You can use pango-markup to have some control of formatting... It is
recognized in various widgets...


On Thu, 24 Mar 2005 23:20:38 +0100, Timothy Parez <timothyparez@linux.be>
wrote:
>  
>  
> 
> Hi, 
> 
>   
> 
> I'm trying to do some basic drawing in GTK# in order to have a window for
a
> chat application which supports colors and emicons. 
> 
> A bit of code in my System.Windows.Forms version looks like: 
> 
>   
> 
>                     //Draw the time 
> 
>                     g.DrawString(messageMatch.Groups["time"].Value,
> this.chatFont, new SolidBrush(Color.DarkGray), e.Bounds); 
> 
>                     currentX =
> g.MeasureString(messageMatch.Groups["time"].Value, this.chatFont).Width; 
> 
>   
> 
> and 
> 
>                         //Image width equals image height 
> 
>                        
> g.DrawImage((Image)Program.IconShortcuts[bodyParts[i].ToLower()],
currentX,
> e.Bounds.Y, imageHeight, imageHeight); 
> 
>                         currentX += imageHeight; 
> 
>   
> 
> So basically I'm looking for a tutorial, but not one that explains how to
> use widgets and stuff 
> 
> but more how to use GTK# as an alternative to GDI+ (I think I'm looking
for
> GDK# ?) 
> 
>   
> 
> Thnx for any help you might be able to provide. 
> No virus found in this outgoing message.
> Checked by AVG Anti-Virus.
> Version: 7.0.308 / Virus Database: 266.7.4 - Release Date: 18/03/2005
> 
> 
> 


-- 
Rafael "Monoman" Teixeira
---------------------------------------
I'm trying to become a "Rosh Gadol" before my own eyes. 
See http://www.joelonsoftware.com/items/2004/12/06.html for enlightment.
It hurts!