Click here to Skip to main content
15,910,980 members
Home / Discussions / C#
   

C#

 
QuestionAnimation for an Agent in C# Pin
macantony27-Nov-11 7:16
macantony27-Nov-11 7:16 
AnswerRe: Animation for an Agent in C# Pin
Eddy Vluggen27-Nov-11 11:39
professionalEddy Vluggen27-Nov-11 11:39 
QuestionRe: Animation for an Agent in C# Pin
Luc Pattyn27-Nov-11 11:46
sitebuilderLuc Pattyn27-Nov-11 11:46 
AnswerRe: Animation for an Agent in C# Pin
Mark Salsbery27-Nov-11 16:19
Mark Salsbery27-Nov-11 16:19 
GeneralRe: Animation for an Agent in C# Pin
Richard Andrew x6427-Nov-11 16:29
professionalRichard Andrew x6427-Nov-11 16:29 
GeneralRe: Animation for an Agent in C# Pin
macantony28-Nov-11 1:12
macantony28-Nov-11 1:12 
AnswerRe: Animation for an Agent in C# Pin
Eddy Vluggen28-Nov-11 8:30
professionalEddy Vluggen28-Nov-11 8:30 
QuestionWinForms: visual clipping of docked controls added at run-time to Panel with AutoScroll=true Pin
BillWoodruff27-Nov-11 2:47
professionalBillWoodruff27-Nov-11 2:47 
Note 1: I just became aware of Luc Patyn's very interesting article: "WinForms AutoScroll Experiment"[^], and am diligently studying that code to see if it would meet my needs in this scenario.

Note 2: I thought about posting this on the WinForms forum, but that forum doesn't see much action, and, I consider it vaguely possible that a similar problem may occur in WPF/SilverLight (poor excuse ?).

Imagine you have a large Panel that fills most of a Form, the OuterPanel: at run-time you are creating/adding Panels into the Controls collection of the OuterPanel, and they are Docked Left. You put a custom drawn border around these inner Panels.

And, you have the auto-scroll property of the OuterPanel set to 'true.

At the point where a new inner Panel is added that exceeds the visible extent of the width of the OuterPanel, the Horizontal ScrollBar will automatically appear.

Unfortunately the H-Scrollbar appearing also reduces the vertical internal size of the OuterPanel's effective display area by about 17 pixels, which can result in the bottoms of your docked inner Panels being 'clipped' out of view.

I have a work-around for this based on detecting the change in the OuterPanel's size, and then just increasing the OuterPanel's height by 17 pixels, but that's ... errr ... not very elegant, since you've got a visible "bump" in the UI. I suppose I could enumerate the inner Panels and shrink their height, also, but I find that equally revolting a thought Smile | :)

The beauty of using Docking is the auto-alignment and re-sizing you get, the downside is you eliminate the other nice features provided by the 'Margin and 'Padding properties of controls.

I would love to have a set of DockedMargin and DockedPadding properties that paralleled the Margin and Padding properties for undocked controls !

I assume there is, but haven't tried to find, some pInvoke that could force a Panel to always show the horizontal scrollbar. I'd consider that a "last resort."

Any ideas ?

thanks, Bill
Scipio: "That's true, Berganza; and what makes the miracle greater is, that we not only speak, but hold intelligent discourse, as though we had souls capable of reason; whereas we are so far from having it, that the difference between brutes and man consists in this, that man is a rational animal, and the brute is irrational." Cervantes, "Colloquy of Dogs," 1613CE. The two talking dogs, Scipio, Berganza, are hallucinations in the mind of a soldier with plague fever undergoing a "sweating" cure.


modified 27-Nov-11 9:14am.

AnswerRe: WinForms: visual clipping of docked controls added at run-time to Panel with AutoScroll=true Pin
OriginalGriff27-Nov-11 3:16
mveOriginalGriff27-Nov-11 3:16 
GeneralRe: WinForms: visual clipping of docked controls added at run-time to Panel with AutoScroll=true Pin
BillWoodruff27-Nov-11 4:06
professionalBillWoodruff27-Nov-11 4:06 
GeneralRe: WinForms: visual clipping of docked controls added at run-time to Panel with AutoScroll=true Pin
OriginalGriff27-Nov-11 4:09
mveOriginalGriff27-Nov-11 4:09 
GeneralRe: WinForms: visual clipping of docked controls added at run-time to Panel with AutoScroll=true Pin
Luc Pattyn27-Nov-11 11:15
sitebuilderLuc Pattyn27-Nov-11 11:15 
GeneralRe: WinForms: visual clipping of docked controls added at run-time to Panel with AutoScroll=true Pin
OriginalGriff27-Nov-11 21:21
mveOriginalGriff27-Nov-11 21:21 
GeneralRe: WinForms: visual clipping of docked controls added at run-time to Panel with AutoScroll=true Pin
Luc Pattyn27-Nov-11 22:06
sitebuilderLuc Pattyn27-Nov-11 22:06 
Answerpartial solution found : Re: WinForms: visual clipping of docked controls added at run-time to Panel with AutoScroll=true Pin
BillWoodruff27-Nov-11 4:50
professionalBillWoodruff27-Nov-11 4:50 
QuestionAbout this 3D graph in C# Pin
derek091927-Nov-11 1:27
derek091927-Nov-11 1:27 
AnswerRe: About this 3D graph in C# Pin
RobCroll27-Nov-11 16:31
RobCroll27-Nov-11 16:31 
GeneralRe: About this 3D graph in C# Pin
derek091928-Nov-11 0:03
derek091928-Nov-11 0:03 
GeneralRe: About this 3D graph in C# Pin
Alan Balkany28-Nov-11 6:01
Alan Balkany28-Nov-11 6:01 
GeneralRe: About this 3D graph in C# Pin
derek091928-Nov-11 13:37
derek091928-Nov-11 13:37 
Questionconvert IEnumerable to Datatable Pin
jojoba201127-Nov-11 0:11
jojoba201127-Nov-11 0:11 
QuestionMatch Two List Box By Sorting ... Pin
nassimnastaran26-Nov-11 7:13
nassimnastaran26-Nov-11 7:13 
AnswerRe: Match Two List Box By Sorting ... Pin
Not Active26-Nov-11 8:05
mentorNot Active26-Nov-11 8:05 
AnswerRe: Match Two List Box By Sorting ... Pin
Luc Pattyn26-Nov-11 8:14
sitebuilderLuc Pattyn26-Nov-11 8:14 
GeneralRe: Match Two List Box By Sorting ... Pin
nassimnastaran26-Nov-11 8:42
nassimnastaran26-Nov-11 8:42 

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

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