Click here to Skip to main content
15,867,686 members
Home / Discussions / Windows Forms
   

Windows Forms

 
AnswerRe: Windows Form Application Size Issue Pin
Simon_Whale29-Jul-12 20:11
Simon_Whale29-Jul-12 20:11 
AnswerRe: Windows Form Application Size Issue Pin
Bernhard Hiller29-Jul-12 22:07
Bernhard Hiller29-Jul-12 22:07 
AnswerRe: Windows Form Application Size Issue Pin
BillWoodruff11-Aug-12 15:31
professionalBillWoodruff11-Aug-12 15:31 
GeneralWindows Forms Application With Collapsible Panel Pin
ukraju20-Jul-12 20:15
ukraju20-Jul-12 20:15 
AnswerRe: Windows Forms Application With Collapsible Panel PinPopular
Eddy Vluggen21-Jul-12 8:16
professionalEddy Vluggen21-Jul-12 8:16 
GeneralRe: Windows Forms Application With Collapsible Panel Pin
BillWoodruff29-Jul-12 17:01
professionalBillWoodruff29-Jul-12 17:01 
GeneralRe: Windows Forms Application With Collapsible Panel Pin
Ger Hayden1-Aug-12 19:45
Ger Hayden1-Aug-12 19:45 
GeneralRe: Windows Forms Application With Collapsible Panel Pin
BillWoodruff12-Aug-12 1:15
professionalBillWoodruff12-Aug-12 1:15 
Good point, Ger,

Indeed, a given UI of this type (sub-panels in a Panel) is may be designed to allow any number of sub-panels to be expanded, or collapsed,or "accordion style," allow only one sub-panel to be open at-a-time: that may mean you need to deal explicitly with visibility, assuming you have the Panel's 'AutoScroll property set to 'true, and there are sub-panels in the Panel's ControlCollection which are scrolled out of view.

I assume you add these controls to your sub-panels at run-time because: either you don't know the number of rows until run-time, or, the end-user may set a parameter that affects number of rows to be rendered into sub-panels on Load, or the user "on-the-fly" changes the number of rows they want rendered into sub-panels (via selection or query or whatever).

Personally, I'm a "true believer," in this situation, in creating a UserControl that can be multiply instantiated, that contains all sub-elements: such as the ones you described: image,label, command button, and then keeping a Collection of those back on the "ranch" (some "MainForm") in a form of a Generic Dictionary, which will vary depending on the scenario, but may be like: Dictionary<subPanel, bool>, where the Boolean might indicate if its "open," or "collapsed."

... edit ...

Assuming a scrollable outer container Panel: if the user does some selection activity ... outside the container Panel ... that will then determine that sub-panel#x needs to be visible, you may have to adjust the scroll-position in your code, if the targeted sub-panel is currently scrolled out-of-view: this is a reason why I like using a generic collection here: to get away from code like
panel2.ScrollControlIntoView(panel2.Controls[0]);
... end edit ...

But, that's just another recipe from Mama's Kitchen, and I am not questioning the way you are doing things now: just extending your comment a bit.

"Each scenario may require a different UI solution that is optimal" is such a cliche, that I won't even mention it here Smile | :)

best, Bill
"Everything we call real is made of things that cannot be regarded as real." Niels Bohr


modified 13-Aug-12 9:25am.

Questionopen web page with out address bar from win forms Pin
vikaskardode6-Jul-12 6:32
vikaskardode6-Jul-12 6:32 
AnswerRe: open web page with out address bar from win forms Pin
Dave Kreskowiak6-Jul-12 9:46
mveDave Kreskowiak6-Jul-12 9:46 
JokeRe: open web page with out address bar from win forms Pin
Mycroft Holmes6-Jul-12 23:15
professionalMycroft Holmes6-Jul-12 23:15 
AnswerRe: open web page with out address bar from win forms Pin
Eddy Vluggen21-Jul-12 13:10
professionalEddy Vluggen21-Jul-12 13:10 
Questionat this point in time would a series of tutorials on WinForms be useful ? Pin
BillWoodruff30-Jun-12 18:34
professionalBillWoodruff30-Jun-12 18:34 
AnswerRe: at this point in time would a series of tutorials on WinForms be useful ? Pin
Paul Conrad30-Jun-12 19:18
professionalPaul Conrad30-Jun-12 19:18 
AnswerRe: at this point in time would a series of tutorials on WinForms be useful ? Pin
Richard MacCutchan30-Jun-12 21:32
mveRichard MacCutchan30-Jun-12 21:32 
AnswerRe: at this point in time would a series of tutorials on WinForms be useful ? Pin
Eddy Vluggen30-Jun-12 23:10
professionalEddy Vluggen30-Jun-12 23:10 
QuestionDisplay large content in windows application Pin
Rajeev_8721-Jun-12 13:18
Rajeev_8721-Jun-12 13:18 
AnswerRe: Display large content in windows application Pin
Mycroft Holmes21-Jun-12 16:36
professionalMycroft Holmes21-Jun-12 16:36 
GeneralRe: Display large content in windows application Pin
Richard MacCutchan21-Jun-12 22:47
mveRichard MacCutchan21-Jun-12 22:47 
Questionupdating, deleting adn adding rows in superlist control Pin
Kandepu Rajesh12-Jun-12 23:37
Kandepu Rajesh12-Jun-12 23:37 
AnswerRe: updating, deleting adn adding rows in superlist control Pin
Pete O'Hanlon13-Jun-12 0:01
subeditorPete O'Hanlon13-Jun-12 0:01 
QuestionError while binding the datatable to a superlist control Pin
Kandepu Rajesh8-Jun-12 0:07
Kandepu Rajesh8-Jun-12 0:07 
AnswerRe: Error while binding the datatable to a superlist control Pin
Eddy Vluggen8-Jun-12 0:33
professionalEddy Vluggen8-Jun-12 0:33 
Questionerrro while binding datatable to asuperlist control Pin
Kandepu Rajesh5-Jun-12 21:16
Kandepu Rajesh5-Jun-12 21:16 
AnswerRe: errro while binding datatable to asuperlist control Pin
Eddy Vluggen6-Jun-12 3:28
professionalEddy Vluggen6-Jun-12 3:28 

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.