[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [PROG] Fremhæve label i gtk--? (eller gtk)



Mads Bondo Dydensborg wrote:
> 
> Hejsa alle
> 
> Jeg har et label jeg gerne vil fremhæve i en gtk applikation.
> 
> Er det muligt? Jeg er bare interesseret i at have et område med tekst der
> har omtrent de samme egenskaber som en label, men bruger f.eks. en fed,
> eller rød tekst.

Du skal have fat i 

gtk_rc_parse ()    #som indlæreser resources fra en fil

gtk_rc_parse_string () # hvis du vil hardkode det 

Selve syntaksen for hvad der skal ind kan læses i

I gtk maualen under resource files. Følgende streng 

sætter resources for en text widget.

style "text"
{
  font = "-adobe-courier-medium-r-normal-*-15-*-*-*-*-*-*-*"
  text[NORMAL] = { 0.0, 0.0, 0.0 } # black
  fg[NORMAL]   = { 0.0, 0.0, 0.0 } # black
  base[NORMAL] = { 1.0, 1.0, 1.0 } # white : background color
}

widget_class "*GtkText" style "text"

Den kan du tage udgangspunkt i og ændre på.

Der er også en mulighed for at ændre styles derekte, jeg har dog aldrig
fået det til at fungere. Det er ret komplekst. 

NB: Det her er for Gtk 1.3 jeg ved ikke om der er ændringer i 2.0


-- 
-
Poul-Erik Andreasen
Hvis du mangler nogen til noget eller du kan noget for nogen.
http://linux-freelance.pea.dk


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 19:58 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *