WiX Simple Line Break? - string

Using 3.5 and I just want a newline character in my Text Element:
<Dialog><Control><Text>
The [Wizard] will install [ProductName]
on your computer.
Click Next to continue or Cancel to exit the [Wizard].
</Text></Control>....
That does not seem to insert a new line character. How can I get a linebreak in there?
Thanks.

Unfortunately Windows Installer doesn’t support line breaks in static text controls. During installation the text is automatically formatted based on control and font sizes.
However, if you really want a line break, simply use another static text control for the next line.

The official answer from Microsoft regarding line breaks in Text controls reads as follows:
The recommended method for displaying text with specified line breaks is to use multiple one-line text controls located below each other. The character sequences \n, \r\n, or \n\r in the text field for the control are not displayed as a line break. These character sequences are literally displayed by the control.

Use CDATA as stumbled upon in this question:
<Control><Text>
<![CDATA[
This is my text.
With a return line
]]>
</Text></Control>

Building on Adam's answer you can also format your text into a WixLocalization entry.
Example:
<WixLocalization xmlns="http://schemas.microsoft.com/wix/2006/localization" Culture="en-US">
<String Id="WelcomeDlgDescription">
This is a custom welcome message.
Click Next to continue or
Cancel to exit.</String>
</WixLocalization>
And use it in your control like this:
<Control Id="Description" Type="Text" X="50" Y="20" Width="200" Height="60" Transparent="yes" NoPrefix="yes" Text="!(loc.WelcomeDlgDescription)"/>

Related

Android Studio Widget, Text Field, Large, Medium and Small Text is missing all I have is Plain which gives a Name. How can I get it and others?

I'm looking at Youtube examples and I see the instructor has Widgets I don't have, Like different size Text Fields and an analogue clock.
Is there somewhere I can get more Widgets?
I obtained a text size same as to the "tutorial" using:
android:textAppearance="#style/TextAppearance.AppCompat.Large"
Looks like AndroidStudio has undergone some change. Best option is to enter the "Text" mode and type the style yourself. For ex. if you need an equivalent of LargeText view, then add a TextView and move onto the Text mode and add this line:
android:textAppearance="#style/?android:attr/textAppearanceLarge"
Or you could also edit the properties of TextView too.
You should add this line android:textAppearance="#android:style/TextAppearance.Large"
inside the TextView after clicking on the Text tab near Design tab located in the middle left to the right of design tab.
but you have to consider that first of all you need to drag and drop TextView from Widgets into the user interface or Design section.
Click into the Text tab located middle left to the right of the Design tab, find the TextView element and within it simply enter this line of code:
style="/?android:attr/textAppearanceLarge"
Remember this line of code has to be within the element in order for it to work.
Go to properties and then select text appearance and select app.
combat.large
Use this:
android:text="Large Text"
android:textAppearance="?android:attr/textAppearanceLarge"
Add it inside your Textview tag.

How to change the background color to perticular word inside a h:inputTextarea

I made a from with input text area, and the value will come from database.
value is some thing like : A 2 year notice has bean applied by mycompany with effect from 12 December 2012.
I want to hilight 12 December 2012 with some different background color.
Note: value will come dinamycally from database.
<h:inputTextarea cols="60" rows="5" id="messageId" style="margin-top:3px;"
value="#{messageBean.textMessage}" />
How can i do this? Thanks !!
Since <h:inputTextarea generates <textarea
Its impossible
Take a look at this similar questions:
Change the Color Of Certain Words In Textarea using Jquery?
And
color codes in textarea using jquery
You can use some WYSIWYG text editor
Like this one used in Primefaes Editor
Or just integrate some third party js WYSIWYG text editor , like CKEditor or TinyMCE
You also can strip all the toolbars/buttons from the editor , so it will eventually look like almost like a textarea
No it is impossible.
But you can do a trick. You can make your <h:inputTextarea component transparent by using the css property background:transparent;. Then use another colored div and place it behind the word you want to highlight. Sometimes you may need to add display:inline-block; to your highlighter div if JSF doesn't render the div with the width you give. A negative z-index may also be needed.

Opening and closing tag highlighting in Dreamweaver

Is there a standard feature or plugin for Dreamweaver CS5 that allows tag highlighting like in Notepad++?
When you click on a tag in Notepad++, the opening and closing tags are both highlighted, and there is a red, vertical, dotted line between them. I find this really handy especially when dealing with large XML documents.
Does anyone know of any way of enabling this feature in Dreamweaver?
Left: Notepad++, Right: Dreamweaver CS5
There isn't really an equivalent way to do this in Dreamweaver. The closest method is to use the Tag Selector while in any view (Split View works best, IMO) to pick the tag and highlight both it and its contents.

How to use 3 <h:form/> tag in JSF in same line?

I am getting a scenerio where there are three buttons() right next to each other. They need to be enclosed by tag to work properly. The problem here is out of 3 buttons, second button operation must open in new window, rest in same window. So I was forced to use 3 tag around 3 buttons respectively with second one having target="_blank" property set. However, each starts with newline. I want all 3 buttons on same line with second button's form tag having property, target="_blank". Thanks
That's because the HTML <form> element is by default a block element. HTML block elements are positioned in their own new line. Apart from putting them inside a table, you can also just display them inline using CSS. This way they won't be positioned in their own line, but next each other.
form {
display: inline;
}
wrap them around <h:panelGrid columns="3">
Then you will have each buttom in one colum, thus inline.
Answer is simple.. Sometimes solution will be right in front of your eyes and we cant see it. Used table tag of simple HTML.

Text Alignment problem

How to control a running text? This is a user generated content, where user used to give with out giving space to the text. for example:
abcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefgh
This goes beyond the specific block. Is there is a way to wrap the text? how can i control it and i also want that to be worked in ie6 also...
You can make strings with no spaces wrap by using the following CSS property:
word-wrap: break-word;
According to the MDC page on the word-wrap property, it is supported in IE 5.5+, Firefox 3.5+, and Safari 1.0+ (but not Opera).
You could use overflow:scroll; in your CSS, this would put a horizontal scroll bar. Should work in IE.

Resources