Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Textbox size change 1

Status
Not open for further replies.

Minch

MIS
Mar 17, 2011
36
US
In my detail section, i put textboxes used as lines.
Problem is if a record is a memo, the line does not grow with the text because it is set on size

Is there a way I can dynamically change the height of this textbox according to the max height of an item in that record?
 
Right-click on the text box and select the option that stats with "Format ..." Turn on "Can Grow".

-Dell

A computer only does what you actually told it to do - not what you thought you told it to do.
 
I did, but height itself would not change.
I have memo textbox that grows according to it's length.
I want line textbox to grow as high as that text box
 
It wasnt' clear that you were talking about a line. You want the line to appear at the bottom of the memo, correct?

To do this, create a section below the section that contains your memo and put a line in it. Or, if you're trying to put a box around the memo, put the bottom of the box in the new section.

-Dell

A computer only does what you actually told it to do - not what you thought you told it to do.
 
May be i'm not clear again.
I have not just one textbox with line but bunch of them..
so putting border around textbox wouldn't work
 
Is it a textbox, a label or both? Is your line spacing set to multiple? Do you have your can grow selected with 0 (for unlimited). Or is is that you want the last line of text to be underlined and that needs to vary depending on length?

Is this being pulled from a database or do you allow a user to type the information into the box.
 
Ok, if I understand you correctly, you want a text box that has the same number of text lines in it as the memo that's beside it - is this correct?

This is not a straight-forward task. You could try using a formula like this:

ReplicateString("_", length({table.memo_field}))

This will get you the same number of under-score characters as there are characters in the memo field. The problem with this is that fonts are proportional, so this won't necessarily guarantee that the text box with the lines is exactly the same size as your memo, but it should get you close.

-Dell

A computer only does what you actually told it to do - not what you thought you told it to do.
 
I can't attach the picture here to make it clear.
Let me explain little more clearly

In detail section,
1) I have textboxes with no text, but left border (used as lines)
2) Databased-generated memo type of textbox

The memo's size can be different based on what the report brings back from the db.
It can be 1 line or 10 lines.

Whether it's 1 line or 10 lines, it is going to be contained in one record.

I want "line" textboxes change the height according to the height of memo textbox's height
 
Okay if I understand correctly, You have database field we will call dbaseField and a text box that you use to as a left border to that dbaseField.

In design mode, drag your dbasefield into your blank text box, the field will then show up as {dbaseField Name} in your text box.

Go into your format text property and under the common tab and set your property to can grow. Click on the border tab and select your left border line style and then under the paragraph tab, set the line spacing to multiple.

I just tried it on something I'm working on it appears to work fine. Let me know how you make out.

Jewel
 
Maybe i'm confusing all of you because I have said "a" textbox initially. I apologize for confusion, but like I said in the last post

I have many textboxes, not just one used as lines.
So putting text into the line text box and turning on left border wouldn't work...
 
So it's not a ratio of one to one i.e.; one border text box assigned to one memotype dbaseField? Are the multiple border text boxes being used as dividing lines that need to grow?
 
You could add the memo field to each text box, and then right click on the field in the box->format text and font->white (or the color of your paper), and then format the text box to "can grow".

-LB
 
LB,
I tried your way.
It works in theory, but because white color is not transparent, but white, it overwrites on top of others.

I need more better solution here, please
 
What is it overwriting? If this is a grid, I wouldn't expect it to be laid on top of an object you want visible.

-LB
 
Can you provide us with a print screen so that we can see what you are trying to accomplish?
 
Right click on the boxes->move->move backward.

-LB
 
As you can see in the picture,
I have to do that for each one, eventually they are going to (not just the text, but lines as well) overlap on top of each other
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top