RE: change text in button



Objet : change text in button
I can not change the color of the text (only when I click on the 
butten..the 'markes' that the button is selected are 'red' then.)
How could I reach the label in the butten in order to change the color? 
something like this button->label ?
Or maybe I need to create a new label, and 'give them the color and pack 
it' again into the button?
@@@@@@@@@@@@@@@@@@
hi
in fact the label of a button is stored in the menber child of the button 
so u can simply refer to it
consider the folowing
label = (GtkLabel*) GTK_BUTTON(MyButton)->child;
here MyButton is a GtkWidget*  that refers to the button i m interested in ;
once u got the label u can alter the foreground color by playing with
label's GtkStyle
thus to change label background color you will need to change the background
color of ur button because the label has no window to render.
NB: of course the code up there will work if u did not modify the child
menber before :D

regards



*************************************************************************
Ce message et toutes les pieces jointes (ci-apres le "message") sont
confidentiels et etablis a l'intention exclusive de ses destinataires.
Toute utilisation ou diffusion non autorisee est interdite. 
Tout message electronique est susceptible d'alteration. 
SG Asset Management et ses filiales declinent toute responsabilite au titre
de ce message s'il a ete altere, deforme ou falsifie.

Découvrez l'offre et les services de SG Asset Management sur le site
www.sgam.fr 

				********

This message and any attachments (the "message") are confidential and
intended solely for the addressees.
Any unauthorised use or dissemination is prohibited. 
E-mails are susceptible to alteration.   
Neither SG Asset Management nor any of its subsidiaries or affiliates shall
be liable for the message if altered, changed or falsified. 

*************************************************************************






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]