How to vertically align the text in static text box in PowerBuilder like the following picture? It can be aligned horizontally to left, center, right. But cannot do the same thing vertically.
Thanks
As far as I know, it cannot be done out of the box.
I have made it anyway "by hand" with the help of the windows API: DrawText(), OffsetRect() and so on to create an improved rounded command button.
You can look at the code in that gist (look at the of_drawtext() method).
Can you explain the purpose of this text box?
Maybe you could use another object where you can easily move your text within.
The text in the box may have a variable number of line?
Do you use sql on the window object?
Maybe put this text between line feed in compute field within the datawindow you used can help you.(Handy Manny's style.....i agree....).
Erf....Seki answered faster
You can use a DW to vertically align a text.
An attribute of the dw static text called "font.escapement" sets the angle at which you want your text displayed.
To display text vertically, set the escapement attribute to 900 (10 * the angle) or to 2700.
Please notice that you will not see the effect in the datawindow painter, you'll have to preview your dw to see if the text is in the correct angle.
Related
I want to align the button horizontally and vertically in Document, i now ho to align horizontally, but i can`t undestand how to align vertically?
In picture bellow, button align horizontal, but how align vertically, in option button i don`t find something about align vertically.
Vertical align is possible in tables only.
Create a table with one row and one column. Set wanted height as "Minimum height" and "Vertically align" to "Center". Content will be centered vertically this way.
I know, it is just a workaround, but it works. Of course, set "Cell Border Thickness" all to 0 so table border is invisible.
If those are 2 buttons, why don’t you just put a ‘return’ (CR) between them. The 2 buttons will be positioned one below the other.
If need be, you can size the buttons, so they have the same width via the properties.
There is no option to "fit to window" vertically in normaal Notes form and document display. It assumes an infinitely long document consisting of paragraphs.
There is, however, the option of displaying a document using the #DialogBox formula or the NotesUIWorkpace.DialogBox method. Both of those have an auto vertical fit argument that you can provide. This will likely require you to redesign your application a bit, but I think it's the only way to do what you want.
How to center the text within a label in a map chart in Spotfire? I tried the labels option but it doesn't have an option to align the text.
sadly, there is no feature to align text inside of a label, and the label formatting features are a bit limited. this goes for all of the other chart types that support labels, too.
one really silly idea I just thought of and haven't tried would be to change the label to use a monospace font like Courier New, and then calculate how many spaces you'd need to place on the left to make the text appear centered, but herein lies only madness and I wouldn't seriously recommend this approach to anyone.
I currently have a plot in its own tab to have a clean look, but I want to display a value overlayed on the plot. This value changes depending on inputs so I don't want to just put a frozen text box there. Any ideas? Thanks in advance.
If I get your question, you want to have dynamic content in a text box?
Create a new text box. Do not add text to it. Click the text box, then in the address bar, put the reference to the cell which contains the text. Example: =Sheet1!A1.
Ok, this is basically what I'm doing right now. I create the raphael text object. I use a click event to open a dialog box. Then I make the changes to the text in the dialog box. This isn't how I wish to implement this though. I want my implementation to be somewhat similar to the way text is created in MS Paint where the user can click on the text object and change the text as they're typing. Does anybody know how to implement this using a raphael text object?
A simple solution would be to create a <textarea> when the user starts editing the text. Fill it with the current text and place it over the text object. Then, when it loses focus (onblur), remove the text area and copy the text back into the text object.
If you really want to edit the text "in place" in the text object, then you can let the user type in a hidden text field. But in this case you'll have to implement all the cursor and selection logic yourself. See this fiddle (which only allows using the right and left arrows to move the cursor, with shift to select text so that you can copy and paste).
Alternately, I don't know if contenteditable works for SVG content, but that would be a very simple solution if it did work.
I Have created a bar chart in a 2007 .xls file, but the data labels cannot be resized. When you go to the "format Data Labels" and then click on alignment, the Autofit and Internal Margin option is grayed out. Anyone know why?
Short version: It is greyed out for chart text, because it the option doesn’t apply.
Long version:
This is because on a chart, chart text do need to use margins, rather you can you can just move the text., and set its X and Y position. For example take the Chart Title, if you want more space to the left, just click and drag the title to the right. If you want the chart title to be bigger you just set a larger font, you have complete control over the title, as well as all other text on that chart, axis titles, legends, data labels, etc.
Internal margins are meant to be used when you don’t have complete control take for example text in a shape. If you insert a shape in your workbook, and add text to it, you cannot just pick the text up and move it to the right if you want more space on the left, so you can set the margin.
Here's a trick that worked for me:
My problem was: I added more text to the axis title and it was too long for it's original shape so some text went into second line.
My solution: I type the complete text somewhere else, copy the text, double click on the axis title and delete the original text -- the cursor would still be there -- now insert the copied text. Done! They are all in one line!
Partial solution to resize label to a single line: Data labels in a chart will often wrap themselves, when you dont want them to. They would often seem better in a vertical single line above the graph item. Reset them to one single line by editing the text in the label, deleting the Excel imposed return, and replace it with a space. The line, and label box, will resize to fit a single line. However because you have "manually interfered with the lable, it will no longer update for changing graph data. You would have to double click each lable then reset it. Most annoying.
A way around it is to make the chart area big. The data label boxes will resize to fit the words in one line. Then make the chart small (not the chart area).
Manually insert a textbox into the bar chart and type in the label that way. It's annoying and labor-intensive, but it works.