Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > General > spacing in data reports


Reply
 
Thread Tools Display Modes
  #1  
Old 03-22-2002, 01:18 AM
satyam satyam is offline
Newcomer
 
Join Date: Feb 2002
Location: Bangalore, India
Posts: 14
Smile spacing in data reports


My data report displays some text in letter format. There are six text boxes to display the text from database. I gave equal spacing between these text boxes ( text1.Top = 1000, Text2.Top=1300, Text3.Top=1600 ....). When a text box's text exceeds the report width then it dynamically expands to next line.
My problem is if Text1 expands to accomodate the second line the other text boxes are not moving equally towards down to maintain the equal spacing between the lines. Is it possible to relocate the controls at run time just like we can do in forms.
(ex: Form1.Text2.Top=7500)? Please help
Reply With Quote
  #2  
Old 03-22-2002, 02:35 AM
AndreRyan AndreRyan is offline
Contributor
 
Join Date: Jan 2002
Posts: 489
Default

Try this:
Code:
Private Sub Form_KeyPress(KeyAscii As Integer)
If Len(Text1.Text) >= CreateNewLineLength then
        Text1.Multiline = true
        Text1.Height = Text1.Height * 2
        Text2.Top = Text1.Height + Text1.Top + SpaceBetweenBoxes
        ...
End If
End Sub

Last edited by AndreRyan; 03-22-2002 at 02:40 AM.
Reply With Quote
  #3  
Old 03-22-2002, 05:17 AM
satyam satyam is offline
Newcomer
 
Join Date: Feb 2002
Location: Bangalore, India
Posts: 14
Default

Thank you very much sir.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->