Give linespace in extjs grid content - extjs

I have a grid containing name and value columns. In value column I want content to have line spaces in between. I'm loading it from the grid store.It seems that "\n" and "\r\n" is not working in extjs.
Plz help me on this.

Escape sequence will not work. Moreover, why exactly do you need extra line space? If you think you need to forcefully add them, one way is to introduce <br/> in your content. Here is an example.

Related

Need to provide spaces between cells in UITableview in ios

I need to provide space between cells in UITableview.And I am also posting an image which consists of here two cells.I have gone through previous posts,but I am unable to find a suitable answers.
Thanks coders
There are several ways to achieve this, and none as simple as you may expect, the two ways that come to my mind right know are:
Define your custom cell to add an space on bottom by playing with the foreground background. If you dont need the space (for instance at the last cell) resize the cell to hide it.
Use a grouped table with one section per cell so you can use that section as space

richtextbox printing with fixed header and footer

Hell Everybody,
I need to provide a facility like letters printing.for letter formats i used a richtextbox to create different formats(Templates).now i need to print this formats with header.Heder information will change always and header height should be fixed for the page.For header informtion displaying also i took one Richtextbox.now i want to merge these two richtext box information before printing.but i failed to maintained the fixed header,if i merge the textboxs information.
Suggest me,what way is better to handle this.

WPF TextBlock Cutoff

Hi Guyz I have a WPF TextBlock of fixed width say 100 , If the string doesnt fit in the width the last character is being cutoff always as all the characters are of not the same size. I dont want to cut the character instead I want to skip the text from there and just display the text with no character cutoff.
You have a couple of options to control wrapping and cutting of text:
TextWrapping can be used to make the text flow to the next line
TextTrimming can be used to decide how to cut text that doesn't fit
TextTrimming=None (the default) will mean that text which doesn't fit will be hidden, but it may cut down the middle of a character, which sounds like the problem you describe.
TextTrimming=WordEllipsis or TextTrimming=CharacterEllipsis will avoid showing half a character, but will append "..." to the end of the text. That will probably look better to users.
If you want to cut off the extra characters without adding the ellipsis, you'd have to use the technique Ed S. described
I suppose that I don't really understand your use case here. My first suggestion would be to simply dynamically size your TextBlock. If that's not possible then you wil have to get the width of the string and manipulate it yourself before you set it in the TextBlock (or use a fixed width font assuming that you can and you know the max length of the string).
If you need to measure the width of the string before it is displayed you can use the FormattedText class to do so.

GtkTextView can't wrap line

Hello I'm using Gtk on C, I need to have a GtkTextView in the middle of my window with many other widgets, I can't make the widget wrap lines. This is a very annoying behavior, anyone have any idea of what am I missing? This is the code I'm using to set it's properties:
gtk_text_view_set_left_margin(GTK_TEXT_VIEW(commentsTextView),20);
gtk_text_view_set_right_margin(GTK_TEXT_VIEW(commentsTextView),290);
gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(commentsTextView),GTK_WRAP_WORD);
gtk_text_view_set_pixels_inside_wrap(GTK_TEXT_VIEW(commentsTextView),0);
gtk_widget_set_size_request(commentsTextView,300,300);
Edit:
I solved this in a different way, still the problem remains unsolved :S
Did you put your text view into a GtkScrolledWindow?
You also need to make sure there are spaces in your text if you want the wrapping to occur on words. If there are no spaces in your string that is inserted into the text view gtk won't know where 1 word ends and the other begins.
If you want the text to wrap on a string without spaces you could use GTK_WRAP_CHAR in place of GTK_WRAP_WORD.

Silverlight 3 - Control over wrapping in TextBox

Ok I have the following problem in Silverlight. I have a control with 2 columns. On the left is a stack panel with line numbers and on the right is a textBox.
So when I write in textBox without wrapping turned on I can simply create the right count of numbers on the left, because I'm searching for '\r' in text.
But when I turn on wrapping I have no control over the count of lines in textBox.
Is there a way to get to that count? Or a way to know which line in textBox is going to wrap?
I hope you can understand what I'm trying to do.
There's one way to do this. You can simulate the word wrap operation in the background using a TextBlock. Here is a good link of the complete solution to this problem.
Extended TextBox control with MaxLines property
Is it not possible to create your items in code before they are passed to the view. This would enable you to bind a list of items to a listview and style them as you wish.
You need to user a value converter to count the number of char / lines and then trim that number if you wish to. Unless you use fixed width, you can't really count or calculte in advancet the size, since each application might be displayed differently (due to different sizing option).
There are two great sample chapters on Windows Phone and Silverlight for Windows Phone on the LearningWindosPhone.com site. There is great Windows Phone Trainng material , and dont forget the Windows Phone Develoeprs Blog
Yes there is a way to get the number of lines occupied by the text in the textbox. It's not that simple though 'coz you have to simulate the behavior of the word wrap in order to count/predict the number of lines generated as a result of a word wrap. I have the solution described here in detail.

Resources