Solved

How to include group of text boxes in a scrollable container

Posted on 2002-07-18
4
178 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 3

Accepted Solution

by:
RodStephens earned 100 total points
ID: 7163386
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
ID: 7163450
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 52

Expert Comment

by:Ryan Chong
ID: 7164288
<ping..>
0
 

Author Comment

by:fmichail
ID: 7165819
Thanks RodStephens that was exactly what I wanted

Thanks again
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article covers the basics of the Sass, which is a CSS extension language. You will learn about variables, mixins, and nesting.
JavaScript has plenty of pieces of code people often just copy/paste from somewhere but never quite fully understand. Self-Executing functions are just one good example that I'll try to demystify here.
The viewer will learn how to count occurrences of each item in an array.
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 …

695 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