Click here to Skip to main content
15,916,180 members
Home / Discussions / C#
   

C#

 
QuestionExtract image(s) from richTextBox Pin
bob200811-Jul-08 9:40
bob200811-Jul-08 9:40 
QuestionAny MultiPage Control available for Windows Form ? Pin
Nadia Monalisa11-Jul-08 7:58
Nadia Monalisa11-Jul-08 7:58 
AnswerRe: Any MultiPage Control available for Windows Form ? Pin
Luc Pattyn11-Jul-08 8:17
sitebuilderLuc Pattyn11-Jul-08 8:17 
GeneralRe: Any MultiPage Control available for Windows Form ? Pin
Nadia Monalisa11-Jul-08 8:52
Nadia Monalisa11-Jul-08 8:52 
GeneralRe: Any MultiPage Control available for Windows Form ? Pin
Luc Pattyn11-Jul-08 9:10
sitebuilderLuc Pattyn11-Jul-08 9:10 
GeneralRe: Any MultiPage Control available for Windows Form ? Pin
Nadia Monalisa11-Jul-08 9:51
Nadia Monalisa11-Jul-08 9:51 
GeneralRe: Any MultiPage Control available for Windows Form ? Pin
DaveyM6911-Jul-08 10:02
professionalDaveyM6911-Jul-08 10:02 
GeneralRe: Any MultiPage Control available for Windows Form ? Pin
Luc Pattyn11-Jul-08 10:10
sitebuilderLuc Pattyn11-Jul-08 10:10 
Emran Hussain wrote:
Using so many panels in Windows Form and showing one at a time is never an easy task.



Emran Hussain wrote:
programmatically relocate it (Size and Position)


I don't agree: rather than inheriting from something that does not do things the way you want
(basically is too complex), I suggest you build it from simpler things. So make a little class (say
MultiPanel) that inherits from Panel and that holds a List of Panels. All the Panels in the List are
added to the Controls collection of MultiPanel, all same size same location, but only one has
Visible=true;

Now give it some properties:
- a Bounds property, that sets the Bounds of each of the Panels
- a SelectedIndex property, that sets all Panels invisible except the one with the matching index
and some methods, including:
- CreatePanel()

FYI: An invisible Panel does not show its contents, and does not consume events. So the whole thing
behaves like the one Panel that is selected. No more, no less.

And if you want to design your panels with Visual Designer, just make them separate classes,
inheriting from Panel, and add them as per above, except you now need a method AddExistingPanel(Panel).

Hope this helps.

Smile | :)

Luc Pattyn [Forum Guidelines] [My Articles]

Voting for dummies? No thanks. Dead | X|


GeneralRe: Any MultiPage Control available for Windows Form ? Pin
Nadia Monalisa11-Jul-08 10:24
Nadia Monalisa11-Jul-08 10:24 
GeneralRe: Any MultiPage Control available for Windows Form ? Pin
Luc Pattyn11-Jul-08 10:34
sitebuilderLuc Pattyn11-Jul-08 10:34 
GeneralRe: Any MultiPage Control available for Windows Form ? Pin
Nadia Monalisa11-Jul-08 11:32
Nadia Monalisa11-Jul-08 11:32 
AnswerRe: Any MultiPage Control available for Windows Form ? Pin
Gareth H11-Jul-08 10:14
Gareth H11-Jul-08 10:14 
QuestionUpdate Control Panel from Control Button Pin
lcm111-Jul-08 7:36
lcm111-Jul-08 7:36 
AnswerRe: Update Control Panel from Control Button Pin
Luc Pattyn11-Jul-08 8:42
sitebuilderLuc Pattyn11-Jul-08 8:42 
QuestionDocking/Anchoring controls Pin
Echilon11-Jul-08 6:55
Echilon11-Jul-08 6:55 
AnswerRe: Docking/Anchoring controls Pin
paas11-Jul-08 8:17
paas11-Jul-08 8:17 
AnswerRe: Docking/Anchoring controls Pin
Luc Pattyn11-Jul-08 8:36
sitebuilderLuc Pattyn11-Jul-08 8:36 
AnswerRe: Docking/Anchoring controls Pin
Echilon11-Jul-08 9:09
Echilon11-Jul-08 9:09 
GeneralRe: Docking/Anchoring controls Pin
Luc Pattyn11-Jul-08 9:14
sitebuilderLuc Pattyn11-Jul-08 9:14 
GeneralRe: Docking/Anchoring controls Pin
DaveyM6911-Jul-08 9:57
professionalDaveyM6911-Jul-08 9:57 
GeneralRe: Docking/Anchoring controls Pin
Echilon13-Jul-08 19:51
Echilon13-Jul-08 19:51 
QuestionHow to stop... Pin
Yosh_11-Jul-08 5:04
professionalYosh_11-Jul-08 5:04 
AnswerRe: How to stop... Pin
Gareth H11-Jul-08 5:14
Gareth H11-Jul-08 5:14 
AnswerRe: How to stop... Pin
Giorgi Dalakishvili11-Jul-08 6:58
mentorGiorgi Dalakishvili11-Jul-08 6:58 
AnswerRe: How to stop... Pin
TheFM23411-Jul-08 7:03
TheFM23411-Jul-08 7:03 

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.