bold

how to make bold font NSString value?

允我心安 提交于 2019-12-02 03:02:22
I am new in iPhone application development. i am developing now iPhone application. In this application i want make bold font in NSString value. How can i achieve this. I am used below code for making bold font text in NSString value. But showing error like this Undefined symbols for architecture i386: "_kCIAttributeName", NSString *boldFontName = [[UIFont boldSystemFontOfSize:12] fontName]; NSString *yourString = [NSString stringWithFormat:@"%@%@%@",key,@":",@" "]; NSRange boldedRange = NSMakeRange(22, 4); NSMutableAttributedString *attrString = [[NSMutableAttributedString alloc]

How to make some text bold in a rich text box in C#

﹥>﹥吖頭↗ 提交于 2019-11-30 08:48:52
I want to create a text editor where I can make text bold, change its color, etc. I found this code to approximately work: public static void BoldSelectedText(RichTextBox control) { control.SelectionFont = new Font(control.Font.FontFamily, control.Font.Size, FontStyle.Bold); } But when I type in more letters in the RichTextBox the text is still bold. How can I make it so that only the selected text is bold and the next characters aren't unless I select the text and hit the "Make Bold" button? You should set the font after the selection to the original font. If you want you can save the

Python tkinter single label with bold and normal text

依然范特西╮ 提交于 2019-11-29 15:20:51
My question is if there is a way to put in a single ttk.label() a text that show the full text with only some words in the bold font like this. I am doing this right now applying styles to many ttk.labels(), but this method imply that I must position every label next to the other, and that the program is multilingual, some strings don't fit correctly with the window. If there is a way to do this, it will be a great advantage to my work. Thanks. No, you cannot change the attributes of only some of the characters in a Label widget. If you need to style individual character you need to use a

Attribute BOLD doesn't seem to work in my curses

倾然丶 夕夏残阳落幕 提交于 2019-11-29 15:11:16
I use something like this: screen.addstr(text, color_pair(1) | A_BOLD), but it doesn't seem to work.. However, A_REVERSE and all others attribute does work! In fact, I'm trying to print something in white, but the COLOR_WHITE prints it gray.. and after a while of searching, it seems that printing it gray + BOLD makes it! Any helps would be greatly appreciated. Here's an example code (Python 2.6, Linux): #!/usr/bin/env python from itertools import cycle import curses, contextlib, time @contextlib.contextmanager def curses_screen(): """Contextmanager's version of curses.wrapper().""" try: stdscr

How to make some text bold in a rich text box in C#

时光总嘲笑我的痴心妄想 提交于 2019-11-29 12:36:33
问题 I want to create a text editor where I can make text bold, change its color, etc. I found this code to approximately work: public static void BoldSelectedText(RichTextBox control) { control.SelectionFont = new Font(control.Font.FontFamily, control.Font.Size, FontStyle.Bold); } But when I type in more letters in the RichTextBox the text is still bold. How can I make it so that only the selected text is bold and the next characters aren't unless I select the text and hit the "Make Bold" button?

What is the Constant Value of the Underline font in Java?

梦想与她 提交于 2019-11-29 09:29:57
What is the Constant Value of the Underline font in Java ? Font.BOLD bold font Font.ITALIC italic font What is the UNDERLINE font Constant ? I try all the available constants but it didn't work . Looking at the Java API Specification , it appears that the Font class does not have a constant for underlining. However, using the Font(Map<? extends AttributedCharacterIterator.Attribute,?> attributes) constructor, one can give it a Map containing the TextAttribute and the value to use, in order to specify the font attributes. (Note that the TextAttribute class is a subclass of

Identify whether the selected text in a web page is bold nor not

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-28 04:45:58
问题 I am trying to identify whether a selected text (in Firefox) is bold or not? For e.g.: <p>Some <b>text is typed</b> here</p> <p>Some <span style="font-weight: bold">more text is typed</span> here</p> The user can either select a part of bold text, or the full bold text. Here is what I am trying to do: function isSelectedBold(){ var r = window.getSelection().getRangeAt(0); // then what? } Could you please help me? Thanks Srikanth 回答1: If the selection is within an editable element or document,

What is the Constant Value of the Underline font in Java?

*爱你&永不变心* 提交于 2019-11-28 02:56:26
问题 What is the Constant Value of the Underline font in Java ? Font.BOLD bold font Font.ITALIC italic font What is the UNDERLINE font Constant ? I try all the available constants but it didn't work . 回答1: Suppose you wanted a underlined and bolded Serif style font, size=12. Map<TextAttribute, Integer> fontAttributes = new HashMap<TextAttribute, Integer>(); fontAttributes.put(TextAttribute.UNDERLINE, TextAttribute.UNDERLINE_ON); Font boldUnderline = new Font("Serif",Font.BOLD, 12).deriveFont

Making specific Text Boldefaced in a TextBox

a 夏天 提交于 2019-11-26 19:03:50
Hi I currently have a texbox that prints out info to the user when they press diffrent buttons. I was wondering if there was a way to make only some of my text bolded while the rest isnt. Ive tried the following: textBox1.FontWeight = FontWeights.UltraBold; textBox1.Text. = ("Your Name: " ); TextBox1.FontWeight = FontWeights.Regular; textBox1.Text += (nameVar); Only problem is that using this way will either make everything bold or nothing. Is there a way to do this? Im using WPF project in C# Any Comments or suggestions are appreciated. Thanks! EDIT: So now im trying to do the RichText box

Making specific Text Boldefaced in a TextBox

不问归期 提交于 2019-11-26 07:46:46
问题 Hi I currently have a texbox that prints out info to the user when they press diffrent buttons. I was wondering if there was a way to make only some of my text bolded while the rest isnt. Ive tried the following: textBox1.FontWeight = FontWeights.UltraBold; textBox1.Text. = (\"Your Name: \" ); TextBox1.FontWeight = FontWeights.Regular; textBox1.Text += (nameVar); Only problem is that using this way will either make everything bold or nothing. Is there a way to do this? Im using WPF project in