Solved

How to include group of text boxes in a scrollable container

Posted on 2002-07-18
4
172 Views
Last Modified: 2013-11-18
I have a very crowded (have many text boxes) TAB in a TAB control, I want to include a scrollable control (container) where I can move these text boxes and be able within the original TAB to scroll and see all the text boxes.given that all the ways like decreasing the spaces and minimizing font size, changing screen resolution ... are not valid options)
Help Please.
0
Comment
Question by:fmichail
4 Comments
 
LVL 3

Accepted Solution

by:
RodStephens earned 100 total points
Comment Utility
Take a look at this example. It shows how to build a scrolled window.

    http://www.vb-helper.com/HowTo/scrwin.zip

You can place the outer PictureBox inside the Tab control. Put the TextBoxes inside the inner PictureBox (take the picture off of it).
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
Comment Utility
As an example from MSDN:

Private Sub Form_Load()

   ' Establece ScaleMode a píxeles.
   Form1.ScaleMode = vbPixels
   Picture1.ScaleMode = vbPixels

   ' Autosize se establece a True para que los bordes
   ' de Picture2 se ' expandan al tamaño del
   ' mapa de bits real.
   Picture2.AutoSize = True

   ' Establece el BorderStyle de cada cuadro ' de imagen a Ninguno.
   Picture1.BorderStyle = 0
   Picture2.BorderStyle = 0

   ' Carga el mapa de bits.
   Picture2.Picture = _
   LoadPicture("c:\Windows\Winlogo.bmp")

   ' Inicializa la ubicación de ambas imágenes.
   Picture1.Move 0, 0, ScaleWidth - VScroll1.Width, _
   ScaleHeight - HScroll1.Height
   Picture2.Move 0, 0

   ' Coloca la barra de desplazamiento horizontal.
   HScroll1.Top = Picture1.Height
   HScroll1.Left = 0
   HScroll1.Width = Picture1.Width

   ' Coloca la barra de desplazamiento vertical.
   VScroll1.Top = 0
   VScroll1.Left = Picture1.Width
   VScroll1.Height = Picture1.Height

   ' Establece la propiedad Max de las ' barras de desplazamiento.
   HScroll1.Max = Picture2.Width - Picture1.Width
   VScroll1.Max = Picture2.Height - Picture1.Height

   ' Determina si la imagen secundaria cabe en la
   ' pantalla.
   Si es así, no son necesarias las ' barras de desplazamiento.
   VScroll1.Visible = (Picture1.Height < _
   Picture2.Height)
   HScroll1.Visible = (Picture1.Width < _
   Picture2.Width)

End Sub

Private Sub HScroll1_Change()
   Picture2.Left = -HScroll1.Value
End Sub

Private Sub VScroll1_Change()
   Picture2.Top = -VScroll1.Value
End Sub

Private Sub Form_Resize()
   ' Cuando cambia el tamaño del formulario, cambian
   ' las dimensiones de Picture1.
   Picture1.Height = Form1.Height
   Picture1.Width = Form1.Width

   ' Reinicializa la posición de la imagen y de las
   ' barras de desplazamiento.
   Picture1.Move 0, 0, ScaleWidth - VScroll1.Width, _
   ScaleHeight - HScroll1.Height
   Picture2.Move 0, 0
   HScroll1.Top = Picture1.Height
   HScroll1.Left = 0
   HScroll1.Width = Picture1.Width
   VScroll1.Top = 0
   VScroll1.Left = Picture1.Width
   VScroll1.Height = Picture1.Height
   HScroll1.Max = Picture2.Width - Picture1.Width
   VScroll1.Max = Picture2.Height - Picture1.Width

   ' Comprueba si son necesarias las ' barras de desplazamiento.
   VScroll1.Visible = (Picture1.Height < _
   Picture2.Height)
   HScroll1.Visible = (Picture1.Width < _
   Picture2.Width)

End Sub
0
 
LVL 49

Expert Comment

by:Ryan Chong
Comment Utility
<ping..>
0
 

Author Comment

by:fmichail
Comment Utility
Thanks RodStephens that was exactly what I wanted

Thanks again
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now