Codemirror line gets wider because line-number - codemirror

I'm using codemirror in one project, just to provide line numbers to the text areas. The problem I'm facing that the editor gets wider while the line number grows. So if I have an editor which is 150 pixels wide, and I add 100 lines for example, it goes to 160 px wide (just example) if I reach the 1k lines it goes to 200 px wide and so on. All the lines have the same width because it is a list, but the editor still getting wider.
How can I prevent this? Thanks in advance.
EDIT
At the end it was a problem with my dataset. I have accepted the only answer because it could help people with this problem on rails

I had a problem similar to this when I was using rails. My suggestion would be to add
//= require codemirror
to your application.js file
and
/*
*= require codemirror
*/
to your application.css file.
You may not be using rails but this may help some people who come across this questions and they have this problem while trying to integrate codemirror with their rails project

Related

Google web designer trouble

Accomplished half part of the project in Google web designer and got a trouble with text formatting:
When creating a text field with the size say 800*300 pixels - it corrects the width and it became exact 230 pixels. When I go to another field - previous seems to be correct sized (800*300).
When I try to work with this field - it becomes 230 pixels width again.
It drives me crazy I can't work!
If I create a new project - everything works fine.
But I can't do anything with my initial project.
What's the problem? Is there any wy to get rid of this?
Try editing the css of the block to match the dimensions you need. Select the text box first and on the Right hand sidebar, you should find a CSS option.

Using Netbeans GUI Layout - items moving around

I have a very busy GUI - lots of textboxes - the end result needs to be 21 columns with 24 text boxes in each column (1 text box for each hour of the day) I am over half way there.
I am getting frustrated with things moving on me as I add a text box or as I adjusted an existing box or title or label.
Is there a way to "lock down" things once I am happy with the look so that I know they can't move and then continue adding pieces?
Is there something I am missing with this problem. I am using (right-click) same size and align (left to column) functions to help. These help some. But I still run into the magic text box that when dropped in things move all around on me.
I am using NetBeans 7.3.1
Thanks
I have had similar problems and issues.
Two suggestions: 1) I have found that if I skip the order I place the textboxes helps with things moving. Meaning - if I had a column of boxes, i would place every other one then go back and fill in. It seemed to behave.
2) you might check into using the swing layout - check the Oracle site.
good luck

TinyMCE 4: Plugin-Window - word wrap available?

I try to migrate our custom plugins from TinyMCE 3 to 4.
In some cases there is some text in the plugin's window to describe how to use it.
Fiddle example: http://fiddle.tinymce.com/Hndaab/1
So if the text is very long, the window width increases until some parts are out of the viewport.
How can i tell the WindowManager to use automatic word wrapping for my labels?
I already tried to define a width for the window. And in another plugin i found a param "multiline". Both didn't solve my problem.
Any ideas? Thank you
I've been trying to accomplish something similar for mobile commpability where the windows are to large for the viewport and so far the closest i've gotten is to set the css for .mce-window to
.mce-window {... max-width:100%;max-height:100%;}
maybe that will be enought to fix your specific problem, even if I still have some ways to go for it to fluidly only fill out the available viewport space on all other windows.

How to display 'print margin' guide behind text

In Eclipse 3.8, I enabled the print margin to help me limit my lines to less than 80 characters. But, because I work a lot with external code with much longer lines, I set the guide color to light grey to prevent interference with text.
My problem is that some letters get distorted under the guide. For example, o appears like c. Is it possible to change the order so that the is guide is displayed behind the text instead of over it?
Unfortunately, it seems that there is no solution.Bug 17805 – [painting] Print margin drawn on top of text

Widget widths: 50% + 50% > 100%?

I am using Google Apps Script and the Apps Script UI Builder, which is based on GWT widgets.
If I create a Flow Panel, and add two Labels of 50% width, then these labels appear on separate lines. But isn't 50% + 50% = 100%.
How do I make them appear on the same line?
To try it out yourself:
Open a Google Spreadsheet.
In the Spreadsheet menu, click: Tools / Script Editor...
In the Script Editor menu, click: File / Build a user interface...
Add the widgets to the canvas.
Of course this question doesn't just apply to the problem with the labels. In general I am totally puzzled concerning how to build flowing layouts with the UI Builder. There seem to be (hidden?) paddings and margins that make things very hard.
It's all based on CSS and its box model, and that issue has accumulates cruft over the last 15 years or so. In essence, the widths you specify don't take into account margings (and/or possibly padding, it's been a while), so you will need to add a stylesheed that minimizes them. See something like this CSS reset.
Labels translate to <div>s, which appear on different lines by default. You could try adding float: left to the labels, or change the display mode, etc.
You could also try InlineLabels, which I think compile to <span>s.
If you've already tried all this, then your Labels are apparently just too wide. It's annoying that two 50% objects wouldn't fit on the same line, but what isn't annoying about working with HTML and CSS?
The solution is simple. For both labels, set to zero:
Borders and Margins / Margin
Don't know why I didn't see that yesterday - I was doing a night shift... ;-)