Print Page | Close Window

SmartPartPlaceHolder autosize

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce Classic
Forum Discription: For .NET 2.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=628
Printed Date: 14-Apr-2026 at 11:24pm


Topic: SmartPartPlaceHolder autosize
Posted By: vecs
Subject: SmartPartPlaceHolder autosize
Date Posted: 19-Dec-2007 at 3:43am
Does anybody know how to implement resize mechanism for SmartPartPlaceHolder so it will always have enough space for contained smartpart to display it without trims and scrollbars?

Here is screenshot of standard SearchResults page with custom"SearchView" smartpart displayed in upper SmartPartPlaceHolder. As you can see the "SearchView" are visually trimmed and scrollbar appeared.

Any ideas how to fix this?


-------------



Replies:
Posted By: Bill Jensen
Date Posted: 20-Dec-2007 at 2:49pm
The DotNetSearchResultsPageView (way down in IdeaBlade.Cab.DotNet) uses a System.Windows.Forms.SplitContainer to hold the SmartPartPlaceholders for the SearcherView (top portion) and SearchResultsView (bottom portion). 
 
The view attempts to adjust the splitter to the preferred height of the SearcherView when initially displayed, but as the window is resized, the split container attempts to maintain the same proportion between the top and bottom panels.
 
The minimum size for the top panel is set to 25 - smaller than the height of your searcher view. 
 
There is a splitter between the searcher and search results views that you can use to expand the top searcher view and get rid of the scrollbar.
 
The SplitContainer has properties to control its behavior, but these are all hard-coded into the DotNetSearchResultsView, so your only choice would be to replicate that view in your foundation module and adjust it accordingly.
 
Hope this at least explains what's going on.
 
Bill J.



Print Page | Close Window