Wrap text next to a button - button

Given something like:
<div class="panel-footer">
<button type="submit" name="submit" value="submit" class="btn btn-primary">Submit</button>
Some lengthy amount of text goes here.
</div>
I want the text to automatically wrap next to the button, instead of starting next to it and wrapping underneath it. It appears with the default alignment, the text of the button is vertically aligned with the text next to it - but the button consumes additional vertical space for the button background. I want the text to use that space - instead of only seeing a single available line. It looks to me my text should be able to wrap at least once if not twice next to the button without consuming additional vertical space.
I've tried just wrapping the button & text in separate divs - but then the text appears under the button. There's obviously something I'm missing - I either want to do this using native bootstrap or a simple inline style - I don't want to modify css.
The default:
[---button top margin--]
[---------SUBMIT---------] Normal text aligns with button text
[button bottom margin]
and then wraps beneath button like this.
Desired:
[---button top margin--] If the text is long enough it should wrap
[---------SUBMIT---------] in this space and automatically
[button bottom margin] center vertically against button
Let's see if I can express it differently - the button element occupies a certain vertical space, which is typically greater than just the vertical height of the text. I want to have a text area next to the button that has the same vertical height as the total button - not just the button text.

Related

Fireworks how make symbol button grow at instance level

I have a rectangle with some text on it defined as a button symbol.
My problem when using the button is that the rectangle does NOT resize but keeps its dimensions. And when I resize the button the text font changes too.I have buttons with short text and some with very long texts. Currently the ones with long text the rectangle is not long enough to accommodate the whole text.
Anybody know how to make a button grow or shrink with text one enters at instance level?
I ended up duplicating the button symbol and making the rectangle much bigger as I found now way of scaling whatever symbol background scale with the text

Reduce space between image and text of button in xamarin forms

Is there any property for xamarin forms Button to reduce the gap between Button image and Button text? I tried to use custom renderer, but I'm not sure which property should be set to reduce gap between image and text.
Adding more detail for clarity:
I have a Button that is of complete width of screen and a defined height. I have image and text property set for Button. While rendering, there is gap between image and text. I need to display text next to image without gap.
Any help would be really appreciated.

In Qt - How to see start of text in a narrow combo box?

I have a QComboBox which I have populated with addItem() repeatedly, and then selected an item with setCurrentIndex(). The trouble is that some of the text is wider than the width of the box and it shows the text moved to the left so the right-hand-side is visible. I want the text in the edit box to be positioned the same as the text in the drop-down box (so the start of text is visible on the left-hand-side, and any oversized text unseen on the right).
Some suggested reasoning: I think it may be trying to ensure the cursor is visible, after leaving the cursor at the end. But I have tried using setCursorPosition(1) but there is no such function in QComboBox.

The page scrolls up instead of the caret moving down

I use wysihtml5 editor. I can type a text normally only till it fits the textarea window. After that a scroll bar appears (which is fine) but let's say I want to type new line on the very top of the text area and when I press enter the line which was just typed moves up outside of the top border of text area and cursos stays on the same first line. So in order to see the first line in the document I just typed I need to scroll one line up. All that instead of the text line stays in place and cursor moves one line down.
That is not usual text editing beheavor. Why is that? Is that an CSS issue?
I guess this has to be an attribute of the text area itself.. but I have no idea how.. I'm myself a beginner in this..
try to search for extra attribute of text-area like:
<textarea rows="2" cols="20" wrap="hard">
....
</textarea>
good luck..

text display starting from bottom up qt

How would I display text in something like QTextEdit starting from bottom up? QTextEdit starts writing at the top filling down to bottom. I want to start from the bottom and then pushing the previous text up as more text is added. I figure I could hack it and simply fill the field with nextlines to reach the bottom then reprinting whatever was written before again when text is to be added, but I wouldn't want to do that unless there isn't any other way.
insertPlainText inserts text at the current text position. You could move the cursor to the start of the docuement using the moveCursor function.
Every time you want to add some text do the following:
textEdit->moveCursor(QTextCursor::Start);
textEdit->insertPlainText(textToBeAdded);

Resources