How to make a textbox expanded

Falcon88

Registered User.
Local time
Today, 20:02
Joined
Nov 4, 2014
Messages
309
Hiii All dears

i have a report that has :
OrderID (Long) , OrderDate (Date/Time), CustmName (Text) , CustDetails (Memo)

how to makes all the textboxs expanded like CustDetails (Memo).
i try to do that but fails.
this is the photo of that report :
photo2
i want it like this :
Photo1
 

Attachments

  • Photo2.jpg
    Photo2.jpg
    45.5 KB · Views: 128
  • Photo1.jpg
    Photo1.jpg
    40.4 KB · Views: 129
if you are using 2007 or later, use the tabular layout for the controls

in report design view, select the three controls in the detail section, then click on the arrange tab and select tabular.
 
if you are using 2007 or later, use the tabular layout for the controls

in report design view, select the three controls in the detail section, then click on the arrange tab and select tabular.

i try that but there are a small blank showed between the textboxs (i not want ) ,
and the textboxs values couldn't centerd as in the photo 1 .
 
not tried it but change the controls padding properties to eliminate the gaps.

Spacing the text in the middle of the box requires some code to adjust the margin properties. To do this, you'll need to know the height of the control after it is enlarged, the size of the text being displayed and whether the text is on one or more lines.

The basic formula would be

top margin = (height of text box-(height of text * number of lines)/2

Have a look at this link http://www.lebans.com/autosize_textbox.htm where you will find code you can adapt to determine the height of the text.

Your code will need to run in the detail onformat event and/or onPaint event depending on whether the report is viewed on screen or printed. And you will probably need to use the onRetreat event to reverse the effect for each row if each row can potentially have varying heights.

Good luck with your project
 

Users who are viewing this thread

Back
Top Bottom