473,406 Members | 2,954 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Best way to implement 2 controls on one window

Dear all,
what is the best way to place to controls (listboxes) on the form, so that
the first listbox takes 2/3 of the form and the second 1/3. This proportion
should also stay if window is resized or moved.
Thanks a lot,
Boni
Mar 11 '06 #1
3 806
Dear all,
may be it was not clear what I want. If you want to full the form with one
control you would normally use form.dock= DockFill. But if there are 2
controls on the form and they must be side/by side and filling the whole
form even if form is resized, what is the best way to implement such
behavoir?
Thanks,
Mar 11 '06 #2
"Boni" <no****@parampam.pam> schrieb
Dear all,
may be it was not clear what I want. If you want to full the form
with one control you would normally use form.dock= DockFill. But if
there are 2 controls on the form and they must be side/by side and
filling the whole form even if form is resized, what is the best way
to implement such behavoir?
Thanks,


Set the controls' location and size in the Form's Resize event.
Armin
Mar 11 '06 #3
On Sat, 11 Mar 2006 15:00:35 +0100, "Boni" <no****@parampam.pam>
wrote:
Dear all,
may be it was not clear what I want. If you want to full the form with one
control you would normally use form.dock= DockFill. But if there are 2
controls on the form and they must be side/by side and filling the whole
form even if form is resized, what is the best way to implement such
behavoir?
Thanks,


If you want, for example, to have two container type controls on a
form (like panels):
1) Dock one of the Panels, Left, and the other Panel, Right.
2) In the Form's Layout Event add:
Me.Panel1.Width = 1 + Me.ClientSize.Width \ 2
Me.Panel2.Width = 1 + Me.ClientSize.Width \ 2
For non-containers, you might look at using the TableLayoutPanel, Dock
Fill, with 2 coloumns, 1 row, columns @50%. Drop a control in each
column and set those controls to 'Fill'.

Gene
Mar 11 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Billy | last post by:
I am implementing a "windowing" library that uses DIVs to simulate windows. It works, but tracking of the mouse pointer is poor. In other words, as long as I move the mouse slowly, the 'window'...
2
by: Duncan Booth | last post by:
What is the best way to override the tab order in a web page? I'm trying to implement a zoom mode for part of a form, so when the zoom button is pressed that section of the form is resized to...
7
by: Saintor | last post by:
What I do now is I put a value in the tag property, and using the form_current event, I run through all controls properties until the ones with the required tag value are met. Sound OK in theory,...
1
by: Chris Uwins | last post by:
Hi there, i know theres a number of ways I can achieve this but want to know the best, (but still quite simple). Up until a year ago I never used Access but have designed a few databases for...
1
by: Jordan | last post by:
I'm converting a section of our website into the .NET framework (the rest will follow sooner or later). I'd certainly like to maintain all the dynamic capabilities as well as implement some new...
4
by: Ned Balzer | last post by:
Hi all, I am pretty new to asp.net; I've done lots of classic asp, but am just beginning to get my mind wrapped around .net. What I'd like to do is include some code that tests if a user is...
2
by: Steve Le Monnier | last post by:
Can anybody give me a quick heads up on the best way to develop C# based DLL's that are called via VBA. I'm developing a pop-up window that will record information within SQL. I need to launch...
3
by: Malenfant | last post by:
I'm currently working on my first relatively complex C# application and I've run into some problems as to the best way to develop the interface. The design spec calls for a treeview on the...
1
by: bizt | last post by:
Hi, I have a process where every so often I refresh a table's data using a setTimeout() .. and when its no longer needed, a clearTimeout(). The following is a simple example of how this is...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.