Dock Problem

  • Thread starter Thread starter Agnes
  • Start date Start date
A

Agnes

I got one progress bar , one panel in my form.
First , I put the progress bar at the bottom of the form and set "dock" to
bottom. It runs very well.
then, I put the panel in the form (set the dock to 'bottom') , Now i want
that panel at the bottom of the form , the progress bar will be placed
uponthe panel. I try to do that.
However, the panel cannot placed at the bottom , (is that because I set
panel & progress 's dock to bottom??)

Please help
 
Agnes said:
First , I put the progress bar at the bottom of the form and set "dock" to bottom. It runs very well.
then, I put the panel in the form (set the dock to 'bottom') , Now i want that panel at the bottom of the form ,

Agnes,

If you need the Panel docked against the bottom edge of the Form,
then it must be the first Control that is docked to the Bottom. When
multiple Controls dock to the same border, first one wins and all
latecomers stack inward.
the progress bar will be placed uponthe panel.

If the Progress Bar is to be placed on the Panel, then call Add( ) on
the Panel.Controls collection to add the Progress Bar to the Panel
[not the Form].

The pseudo code will look similar to this,

create new Panel
code to set Panel properties
set Panel to Dock on the Bottom
add Panel to Form.Controls
'
create new Progress Bar
code to set Progress Bar properties
set Progress Bar to Dock on the Bottom
add Progress Bar to Panel.Controls

This way the Progress Bar is at the bottom of the Panel, and the Panel
is at the bottom of the Form.


Derek Harmon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Docking behavior 7
Multi-panel dock 1
Dock 2
using splitter object 9
Splitters and Docking 14
Order in which controls are docked 2
Docking problems 2
Docking of controls 4

Back
Top