line spacing in label + vb.net - vb.net

I have a .NET 2.0 standard Label on my form, well I put some text in it with several lines. But the spacing between the lines are too small. Just want to know if there's a way to fix this.
Thanks...

The only solution I can see would be to make multiple labels and space the labels appropriately.
You may need to create the labels dynamically, one per line.
Of course, you could do a .Split(vbNewLine) on the text you want to display and then for each string in the list, create a new label control, adding it to the form, and spacing it out appropriately from the previous label.
Not ideal, but about the only way to accomplish it.

There is another alternative way to work out that you use the WinformHTMLTextBox then embed the content by using html code which you can employ the advantage of CSS.

Related

How can I set the line height of a multi-line PDF form field, and save it so it doesn't get reset by filling it?

I am having the exact same issue described in this question: Multiline pdf text box
I have a PDF that has some dotted lines that I want to convert into a fillable multi-line field. I tried the solution in the linked question, but my setting is not staying when I try to fill in the field outside of Acrobat.
When I am preparing the form inside Acrobat, I set the line height to 30 and it is lining up fine:
But when I save this PDF and then try to fill in the field outside of Acrobat, the line height setting does not stay. It gets reset every time:
It's super frustrating and I have scoured the internet looking for an answer but I have nothing yet. If someone knows what to do to get the line height looking like the first screenshot, please save my sanity.
I'm using Adobe Acrobat Pro DC 2021.001.20135 on macOS 10.14.6.
Thank you
You can't. Those settings don't "stick" when the field is cleared and there's no way to set them programmatically. It's best to simply remove the lines from the PDF.
As #joelgeraci stated, the settings don't stick.
However, if the form has to be manually fillable, removing the writing lines may not be the best idea. In this situation, it would be better to change the field's background color. When the field has no content, its background color is transparent, otherwise white. And that will cover the writing lines.

Access Report: Wrap Text Not Working

I have a report with unbound textbox's in them. I populate these fields onLoad.
The problem, though, is that the if the text is too long, it will not wrap. I have set Can Grow = Yes but this does not seem to work.
Is it due to the fact I am adding the string to the field OnLoad? If so, how can I overcome this and force the text to wrap? I would want the width to remain constant, but the height to grow.
Figured this out... I right clicked the text box and selected Size > To Fit...
I had the box big enough to accommodate a second line. It wouldn't ever word wrap until I made the change above. Can Grow and Can Shrink did nothing, but I left them selected.
I open report from code in design mode, make changes to control source of the text fields, save and close report and lastly open it in preview mode. The only way I get what I want.
I know this is an old post but I've been running into the same issue and haven't been able to figure out a solution until now.
One of the fields in print preview was getting cut off for me and despite my best efforts to make sure all the formatting settings were correct (i.e. Can Grow/Shrink: On) for both the detail section and the specific field. Again, this issue only happened in print preview, which meant the reports that were getting printed had the text cut off.
Solution:
I ended up realizing that all of the other text fields were set to Plain Text and the text field giving me the issue was set to Rich Text. I changed it to Plain Text and voila! It displayed everything without any issues.
My guess is that if you're having this issue, make sure all of the fields are set to the same property (Rich Text/Plain Text). Not sure why Access has trouble with this but I hope this solution helps someone else out.
The simple solution to this huge problem is listed below.
Convert the property of the textbox from plain text to rich text.
Set the text align property to distribute.
Enable can shrink and can grow property of the text box. (Yes)
Done.
After a lot trial-and-error, the solution seems to be that the text box that you want to scroll must have enough height to show two vertical lines. A textbox that is only one line high will not scroll. (You must also have Can Grow set to 'Yes' for both the textbox and the detail section.)
You also have to have the CAN GROW of the section that the text box is in set to YES as well as the text box.

Creating text mosaic in Actionscript

Does anyone know how to approach creating a text based mosaic using action script given a collection of words?
Similar to this
http://www.ezmosaic.com/mosaic-samples/text-message-mosaic/
You can accomplish that by using the text you want to render as a mask for the picture you want to fill the text with.
Mask property

A Text value change on Powerpoint by using OpenXml doesn't fit

I use OpenXml for creating custom powerpoint presentation in this way: I put a keyword on the presentation, I found it during process with OpenXml and change the text value. Everything work fine but the fit option doesn't work at first.
The text box has options "Autofit: Shrink text on overflow; Wrap text in shape: On"
After my process, the new text appear on the right place but the autofit is not done, I need to click on the text box and make a input for see the autofit work. I think that PowerPoint only check option after a modification.
What I want is the autofit option is called at the end of the process. Can anyone help me?
I hope you understand what I want to do.
Thanks.
It's not possible using just OpenXML. The <a:normAutofit/> tag is used by a client application, such as PowerPoint, to render the text larger or smaller, as needed. OpenXML doesn't actually render anything, so until the client does, it will just read the text as if it is not auto-fitted.
There are a few options to think of to control this - none of them great however. One would be to use VSTO or VBA in PowerPoint to check all shapes on PPTX open and if they have a AutoFit tag, to re-render them. A second way would be to do all the font measurements yourself based on the shape's width & height and then set the font scale to the appropriate percentage. Another would be to make a textbox large enough to fit the largest amount of text you will ever insert and then turn autofit off.
Sorry this doesn't really help you immediately. I've done tons of research on this particular subject and it's all bad news.

Creating a More Attractive DataGridView

My form looks like this with a DataGridView:
I would like to make it look more professional. Can someone recommend a "makeover" for it? Perhaps there is a more attractive way to display this data.
I have been using a free grid control from Component Factory, it has all the same features as the standard DataGridView. The grid allows customization for pretty much all UI elements.
This looks quite nice already. What you might want to do is set the Dock to Fill with the Properties panel to make it fill the whole form.
Personally, I'd recommend softening those colors a bit. Use pastel-versions of the same color perhaps.
Also, like person-b suggests: Dock->Fill.
I'm not a big fan of unnecessary row/record-selector columns. If you don't need it, I'd recommend getting rid of it.
One last thing, Normally I'd recommend not paining your UI with a crayon, instead letting the colors default to whatever the user has specified as their Windows theme. However, I see the point of coloring the columns in your case. I would suggest that you allow the user to modify the colors. I'm not color-blind, but it's possible your colors may be unreadable to someone who is.
My first thoughts are on the column colors, does the color mean something, if you are try to differentiate to columns I would use two subtle colors. Large color shifts should have a meaning (Errors are bold and Red). The Font should use the System font styles and basic colors should also you the system colors. Colors and font styles may work for you but not everyone, some people are color blind, some people need larger fonts.