Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

panel does not get scroll bars whne larger form added

Status
Not open for further replies.

j0em0mma

Programmer
Jul 31, 2003
131
US
I have a somewhat complex configuration. I have a mainform which loads a series of level 1 forms. These are then shown or hidden depending upon navigation.

Each of these forms in turn is inherited from a template form. Because I have docked Screen Splitters on the template, I am not able to drag controls into the inherited forms. Thus, I must programatically add the variable content.

Variable content is kept in a series of level2 forms. When needed these are included in the content section of the level1 forms, which are the inherited forms.

The template form has a docked-all splitscreen control. The splitscreen panel2 is autoscroll=false and contains a regular, docked-all panel with autosize=false and autoscroll=true. This is the panel I am programatically adding the level2 content forms to. The forms show up fine, but I cannot achieve any configuration which will cause the scrollbars to appear.

I tried setting the splitscreen panel2 to autscroll=true and the normal panel inside it to autosize=true, autosizemode = grow and shrink. No use.

Is this a problem with inherited forms? Is it a problem with programatically adding large content to smaller scrollable containers? Any ideas would be much appreciated.

Thanks in advance

-j0em0mma
 

Maybe you should set some values to the panel's autoScrollMinSize's width and/or height

 
Always good to post first and then find a sort-of solution. Apparently, if a control is docked to it's parent, the parent will not scroll in whatever dimension the child is docked.
 
just thought about this, maybe you too, but i'll say it anyway...

instead of setting a "dock all", try setting an "achor top-left-botton-right
 
Thanks Mastakilla,

That does seem to work. Unfortunately, you must write a few lines for every one of these you need as the child control must be sized equal to the parent in order to simulate docking. Your recommendation DOES work though.

My main issue was I wanted to use a background for the content. since you can't make a form transparent if it is included on another form, and thus you can't make the child transparent and show the parent background through it, I was worried I'd have a hard time matching up the backgrounds of the parent and the child. Seems to work fine, though, so no need for the extra exertion of resizing...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top