Click here to Skip to main content
       

Windows Forms

 
AnswerRe: .docx to .pdf conversion PinmemberAndrei Straut17-Sep-12 4:52 
GeneralRe: .docx to .pdf conversion PinmemberMember 857432717-Sep-12 5:04 
GeneralRe: .docx to .pdf conversion PinmemberAndrei Straut17-Sep-12 5:11 
QuestionDataGridView Collapse Top Border PinmemberMark Regal15-Sep-12 6:15 
QuestionInfragistics UltraGrid PinmemberKevin Marois12-Sep-12 6:49 
AnswerRe: Infragistics UltraGrid PinmvpAbhinav S12-Sep-12 8:37 
Questionabout c# Pinmemberpawan19937-Sep-12 3:03 
AnswerRe: about c# PinmemberWes Aday7-Sep-12 3:21 
GeneralRe: about c# PinmemberEddy Vluggen7-Sep-12 3:54 
QuestionSQL Connection problem in Windows Service PinmemberMember 799263524-Aug-12 1:17 
AnswerRe: SQL Connection problem in Windows Service PinprotectorPete O'Hanlon24-Aug-12 1:21 
GeneralRe: SQL Connection problem in Windows Service Pinmemberdojohansen10-Oct-12 6:19 
GeneralRe: SQL Connection problem in Windows Service PinprotectorPete O'Hanlon10-Oct-12 6:32 
Questionstrategy for correcting the side-effects of using Dock (which ignore Margin settings) PinmemberBillWoodruff14-Aug-12 1:08 
Hi,
 
Docking is quite useful in creating UI's, but when you Dock something: the "Margin" property settings of what you Dock are ignored.
 
In the past, I've created several types of UI's where an "outer" Panel's ControlCollection consists solely of identical "inner" Panels, all of the same type.
 
Setting all these "inner Panels" to Dock = Top, or whatever is very useful, but they will all be "jammed together" visually: Any Margin.Top or Margin.Top settings of these inner Panels will be ignored.
 
So far, my strategy for creating a better visual experience has been to use UserControls, not "raw" Panels, for the inner things-that-act-like-Panels:
 
Each UserControl has an "inner" Panel inside an "outer" Panel. Both these have Dock set to 'Fill. By setting the background color of the outer Panel to the same color as its outermost Panel, "the host," and then setting the Padding property of the outer Panel in the UserControl to offset the differently colored inner Panel of the UC:
 
Then, when they get all "jammed together" by docking, you can at least simulate a nice visual effect of space between the Docked inner Panels.
 
A logical question for you to be asking right now is: why not just set the UserControl BackColor to the same color as its host container, and have only one Panel in the UC: while I have done this, the simple answer is that I prefer the more fine-grained control possible (I can create fancier visual effects), by having outer/inner Panels in the UC.
 
I wonder if there is a simpler way to approach this ?
 
I guess in an ideal world ... hah ... we could have an over-load of the Dock mechanism, that you would pass a bool into with a name like "respectMarginSettings" Smile | :)
 
Should I add some links to "before" and "after" small .jpg screen-shots to this question, to make crystal-clear the visual results I am talking about ?
 
best, Bill
"Everything we call real is made of things that cannot be regarded as real." Niels Bohr

AnswerRe: strategy for correcting the side-effects of using Dock (which ignore Margin settings) Pinmemberdojohansen10-Oct-12 7:01 
QuestionEditingPanel Erasing Top Cell Border PinmemberMark Regal13-Aug-12 20:06 
AnswerRe: EditingPanel Erasing Top Cell Border PinmemberMark Regal14-Aug-12 4:14 
QuestionVS2010 Setup and Deployment Project - CommonAppDataFolder for XP PinmemberMember 269415310-Aug-12 10:05 
AnswerRe: VS2010 Setup and Deployment Project - CommonAppDataFolder for XP PinmvpDave Kreskowiak10-Aug-12 15:19 
GeneralRe: VS2010 Setup and Deployment Project - CommonAppDataFolder for XP PinmemberMember 269415313-Aug-12 3:18 
AnswerRe: VS2010 Setup and Deployment Project - CommonAppDataFolder for XP Pinmemberictxiangxin13-Aug-12 5:03 
QuestionWrapping of Data Grid View column [modified] Pinmemberukraju5-Aug-12 21:58 
AnswerRe: Wrapping of Data Grid View column PinmemberMember 908236510-Aug-12 13:59 
QuestionWindows Form PinmemberDSPNEOqqq3-Aug-12 10:15 
RantRe: Windows Form PinmemberEddy Vluggen3-Aug-12 10:30 
GeneralRe: Windows Form OT PinmemberWes Aday3-Aug-12 10:41 
GeneralRe: Windows Form OT PinmemberEddy Vluggen3-Aug-12 11:01 
AnswerRe: Windows Form PinmemberChristian Amado6-Aug-12 11:47 
AnswerRe: Windows Form [modified] PinmemberBillWoodruff11-Aug-12 16:27 
GeneralRe: Windows Form PinmemberEddy Vluggen12-Aug-12 4:43 
QuestionWindows Form Application Size Issue Pinmemberukraju29-Jul-12 20:45 
AnswerRe: Windows Form Application Size Issue PinmemberSimon_Whale29-Jul-12 21:11 
AnswerRe: Windows Form Application Size Issue PinmemberBernhard Hiller29-Jul-12 23:07 
AnswerRe: Windows Form Application Size Issue PinmemberBillWoodruff11-Aug-12 16:31 
GeneralWindows Forms Application With Collapsible Panel Pinmemberukraju20-Jul-12 21:15 
AnswerRe: Windows Forms Application With Collapsible Panel PinmemberEddy Vluggen21-Jul-12 9:16 
GeneralRe: Windows Forms Application With Collapsible Panel [modified] PinmemberBillWoodruff29-Jul-12 18:01 
GeneralRe: Windows Forms Application With Collapsible Panel PinmemberGer Hayden1-Aug-12 20:45 
GeneralRe: Windows Forms Application With Collapsible Panel [modified] PinmemberBillWoodruff12-Aug-12 2:15 
Questionopen web page with out address bar from win forms Pinmembervikaskardode6-Jul-12 7:32 
AnswerRe: open web page with out address bar from win forms PinmvpDave Kreskowiak6-Jul-12 10:46 
JokeRe: open web page with out address bar from win forms PinmemberMycroft Holmes7-Jul-12 0:15 
AnswerRe: open web page with out address bar from win forms PinmemberEddy Vluggen21-Jul-12 14:10 
Questionat this point in time would a series of tutorials on WinForms be useful ? PinmemberBillWoodruff30-Jun-12 19:34 
AnswerRe: at this point in time would a series of tutorials on WinForms be useful ? PinmemberPaul Conrad30-Jun-12 20:18 
AnswerRe: at this point in time would a series of tutorials on WinForms be useful ? PinmvpRichard MacCutchan30-Jun-12 22:32 
AnswerRe: at this point in time would a series of tutorials on WinForms be useful ? PinmemberEddy Vluggen1-Jul-12 0:10 
QuestionDisplay large content in windows application PinmemberRajeev_8721-Jun-12 14:18 
AnswerRe: Display large content in windows application PinmemberMycroft Holmes21-Jun-12 17:36 
GeneralRe: Display large content in windows application PinmvpRichard MacCutchan21-Jun-12 23:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web03 | 2.8.141223.1 | Last Updated 10 Dec 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid