text-styling

How to print an String variable as italicized text

瘦欲@ 提交于 2019-12-09 03:38:32
问题 I have the following statements inside my class: String myName = "Joe"; System.out.println("My name is " +myName); I need the value on the variable myName to be printed as italic text. 回答1: Try: System.out.println("\033[3mText goes here\033[0m"); Which will output italic text if your console supports it. You can use [1m for bold, etc. Play around with the different values of [ n m . 回答2: Here is an example of how to do that: import java.io.FileWriter; import java.io.PrintWriter; import java

Text styles in localization resources

廉价感情. 提交于 2019-12-08 03:18:42
问题 I've a question about localization resources at windows-phone. Let's say, I have a string in my Resources file, which should look like as: This is some text. This value is bold. This one is italic. And that all stored in a single string field. How could I define such text styles like bold or italic in the Resources itself? I know, I can predefine some custom fonts, like this: <FontFamily x:Key="CustomBold">...</FontFamily> and then add is as {StaticResource CustomBold} in page, but that can

Android Textview Italic and wrap_contents

亡梦爱人 提交于 2019-12-05 01:46:04
I am using 3 italic textviews with different colors <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:id="@+id/submittedBy" android:paddingTop="10dip"> <ImageView android:id="@+id/subByImg" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="left" android:layout_gravity="bottom" android:src="@drawable/submitted_by_arrow"/> <TextView android:id="@+id/submitLabel" android:layout_width="wrap_content" android:layout_height=

Crystal report with HTML content formatting

蹲街弑〆低调 提交于 2019-12-04 17:54:40
Is anybody of you worked on HTML data populating into crystal reports? Am using Visual studio 2010. I had an XML data coming from DB. Which am able to convert into HTML using XSL. Now my next task is to get it into crystal report. Any hint will be greatful. Because all the online resources are simply giving me results related to creating dataset and executing stored procedures etc. I was able to pull my HTML content to crystal report. Now the embedded styling was not able to get applied. Any clues whr do i need to tweak? Thanks in advance. Regards, Pavan N Are you pushing the HTML into a text

Android text style missing light, medium, thin,

◇◆丶佛笑我妖孽 提交于 2019-12-03 04:36:46
When setting custom fonts for a textview, I can only choose normal, bold or italic: How can I set the style to be light instead of bold in the following example? <TextViewWithCustomFont ... android:textStyle="bold"/> This is font specific. Not all fonts have a light , medium , thin attribute/style, but the default font should. You can use the default light font by using fontFamily: sans-serif-light or for thin, fontFamily: sans-serif-thin . For custom fonts, you would need to include the light version of the font and use it. You can only combine those three attributes : normal bold italic http

How to line-through all links inside a border and bold mark certain text of a paragraph

て烟熏妆下的殇ゞ 提交于 2019-12-02 15:31:59
问题 This is the end product i'm supposed to create and i'm currently during this stage of the process and i'm stuck on how to do a line-through 3/4 links of the bottom border and how to bold mark both borders final paragraph. and also how to create space between the 2 borders as shown in the end product <!DOCTYPE html> <html lang="sv"> <head> <meta charset="utf-8" /> <title>Uppgift 4E</title> <style> html { background-color: lightslategrey; } body { margin: auto; width: 500px; padding-bottom: 0

JavaFX 8 - How to change the color of the prompt text of a NOT editable combobox via CSS?

怎甘沉沦 提交于 2019-12-02 07:48:13
问题 The title says everything. I want to change the color of the prompt text of a not editable combobox , so that the text has the same color like the prompt text of a editable combobox . In my CSS-file I tried to use -fx-prompt-text-fill in .combo-box , .combo-box-base , .combo-box-base .text-field and .combo-box-base .text-input , but nothing worked. What styleclass do I have to use? 回答1: When the ComboBox is not editable, there is no TextField , and the property -fx-prompt-text-fill is no

WPF RichTextBox Syntax Highlighting Issue

懵懂的女人 提交于 2019-11-28 08:48:19
Hello everyone I've been working on a WPF application that has a text editor this text editor should apply some styling or colorizing over some tokens (keywords) to highlight it and make it obvious,,, the problem is i tried very very hard but i still get the same result which is when the user enters one of the keywords the whole text after that keyword is being styled ! just imagine if you types the " string " keyword in " C# " the whole text after it will be colored blue. this was the code i used: static List<string> tags = new List<string>(); static List<char> specials = new List<char>();

How to set the font style to bold, italic and underlined in an Android TextView?

巧了我就是萌 提交于 2019-11-27 10:01:08
I want to make a TextView 's content bold, italic and underlined. I tried the following code and it works, but doesn't underline. <Textview android:textStyle="bold|italic" .. How do I do it? Any quick ideas? Nanne I don't know about underline, but for bold and italic there is "bolditalic" . There is no mention of underline here: http://developer.android.com/reference/android/widget/TextView.html#attr_android:textStyle Mind you that to use the mentioned bolditalic you need to, and I quote from that page Must be one or more (separated by '|') of the following constant values. so you'd use bold

How to set the font style to bold, italic and underlined in an Android TextView?

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-26 14:59:02
问题 I want to make a TextView 's content bold, italic and underlined. I tried the following code and it works, but doesn't underline. <Textview android:textStyle="bold|italic" .. How do I do it? Any quick ideas? 回答1: I don't know about underline, but for bold and italic there is "bolditalic" . There is no mention of underline here: http://developer.android.com/reference/android/widget/TextView.html#attr_android:textStyle Mind you that to use the mentioned bolditalic you need to, and I quote from