GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Thu Apr 17, 2014 7:13 am

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: gtk Entry text bold
PostPosted: Sun Apr 28, 2013 9:47 am 
Offline
Familiar Face

Joined: Sun Mar 24, 2013 8:35 am
Posts: 6
(How) can I make the text in an gtk Entry bold. Using .set_text('<b>some text</b>') and .set_use_markup(True) doesn't work; set_use_markup is not a valid Entry-method.


Top
 Profile  
 
 Post subject: Re: gtk Entry text bold
PostPosted: Mon Apr 29, 2013 5:38 pm 
Offline
Never Seen the Sunlight

Joined: Mon Apr 28, 2008 5:52 am
Posts: 709
Location: UK
Hi,

I have not tried any of this, but I think you may need to use Pango to set the text attributes.

_________________
E.


Top
 Profile  
 
 Post subject: Re: gtk Entry text bold
PostPosted: Mon May 13, 2013 4:24 pm 
Offline

Joined: Mon Mar 25, 2013 10:28 am
Posts: 2
As i understand entry holds only the typed Text (preset Text). But no Pango's. I think there is no way to do that.

cu


Top
 Profile  
 
 Post subject: Re: gtk Entry text bold
PostPosted: Mon May 13, 2013 8:28 pm 
Offline
GTK+ Guru

Joined: Sun Jul 08, 2012 3:14 pm
Posts: 107
Location: Coventry, UK
I do italics in this way
Code:
    char* markup=g_markup_printf_escaped ("<span style=\"italic\">%s</span>", filename);
    gtk_label_set_markup(GTK_LABEL(flabel), markup);


may be that is the same way to have bold


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group