Solved

How to include group of text boxes in a scrollable container

Posted on 2002-07-18
4
174 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
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 50

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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Adding to a VBA? 6 70
How to replace a token in a string with square brackets? 2 69
Visual Studio 2005 text editor 10 38
how to know if my Checkbox is True in VB6.0? 9 55
What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

777 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