Click here to Skip to main content
14,269,407 members
   

C#

 
AnswerRe: sample application to customize combo box with multi selection an check box in winform Pin
OriginalGriff18-Apr-19 3:43
protectorOriginalGriff18-Apr-19 3:43 
GeneralRe: sample application to customize combo box with multi selection an check box in winform Pin
#realJSOP18-Apr-19 8:00
mve#realJSOP18-Apr-19 8:00 
GeneralRe: sample application to customize combo box with multi selection an check box in winform Pin
OriginalGriff18-Apr-19 8:05
protectorOriginalGriff18-Apr-19 8:05 
GeneralRe: sample application to customize combo box with multi selection an check box in winform Pin
Dave Kreskowiak18-Apr-19 8:55
mveDave Kreskowiak18-Apr-19 8:55 
AnswerRe: sample application to customize combo box with multi selection an check box in winform Pin
Gerry Schmitz18-Apr-19 6:12
mveGerry Schmitz18-Apr-19 6:12 
GeneralRe: sample application to customize combo box with multi selection an check box in winform Pin
OriginalGriff18-Apr-19 6:34
protectorOriginalGriff18-Apr-19 6:34 
QuestionHow store all TabPage items in c# Pin
Richi38117-Apr-19 22:58
memberRichi38117-Apr-19 22:58 
AnswerRe: How store all TabPage items in c# Pin
OriginalGriff17-Apr-19 23:34
protectorOriginalGriff17-Apr-19 23:34 
That isn't going to work, at least partly because you don;t know how many tabpages you have to start with.

If you weren't a beginner, I'd suggest a user control derived from TabPage which "knows" how to serialise and deserialise itself, or using JSON - but for a beginner that is quite a bit to learn.

So instead, consider writing a method which returns the relevant details from a tabpage as a string, with each element as key=valuepairs, separated by semicolons:
Text="the text on the tab";Name="The Name";LabelText="The label text";...
And then collecting those together as a bigger string, separated by newlines. Save that string, and when you restore it, use string.Split to separate the lines, then create a method that takes each line as a string and returns a new TabPage with the information filled in. Again, string.Split separates each key/value pair, and another split gives you the key and value. A simple switch lets you put each key value in the right place.

Make sense?
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!

AnswerRe: How store all TabPage items in c# Pin
#realJSOP18-Apr-19 2:18
mve#realJSOP18-Apr-19 2:18 
GeneralRe: How store all TabPage items in c# Pin
Richi38125-Apr-19 20:29
memberRichi38125-Apr-19 20:29 
AnswerRe: How store all TabPage items in c# Pin
Gerry Schmitz18-Apr-19 6:09
mveGerry Schmitz18-Apr-19 6:09 
AnswerRe: How store all TabPage items in c# Pin
BillWoodruff18-Apr-19 20:48
mveBillWoodruff18-Apr-19 20:48 
GeneralRe: How store all TabPage items in c# Pin
Richi38125-Apr-19 21:39
memberRichi38125-Apr-19 21:39 
AnswerRe: How store all TabPage items in c# Pin
BillWoodruff26-Apr-19 4:09
mveBillWoodruff26-Apr-19 4:09 
QuestionHow to handle PCB components layout in designing LED switching power supply? Pin
Pcbindex17-Apr-19 19:57
memberPcbindex17-Apr-19 19:57 
AnswerRe: How to handle PCB components layout in designing LED switching power supply? Pin
OriginalGriff17-Apr-19 20:05
protectorOriginalGriff17-Apr-19 20:05 
Questionlast 3 numbers Pin
_Q12_17-Apr-19 12:04
member_Q12_17-Apr-19 12:04 
AnswerRe: last 3 numbers Pin
Gerry Schmitz17-Apr-19 13:05
mveGerry Schmitz17-Apr-19 13:05 
GeneralRe: last 3 numbers Pin
_Q12_17-Apr-19 13:36
member_Q12_17-Apr-19 13:36 
AnswerRe: last 3 numbers Pin
Luc Pattyn17-Apr-19 13:11
professionalLuc Pattyn17-Apr-19 13:11 
AnswerRe: last 3 numbers Pin
#realJSOP18-Apr-19 2:04
mve#realJSOP18-Apr-19 2:04 
AnswerRe: last 3 numbers Pin
BillWoodruff18-Apr-19 20:57
mveBillWoodruff18-Apr-19 20:57 
QuestionWCF Pin
Member 1406752317-Apr-19 4:12
memberMember 1406752317-Apr-19 4:12 
AnswerRe: WCF Pin
#realJSOP17-Apr-19 4:25
mve#realJSOP17-Apr-19 4:25 
QuestionReferencing Dynamic Control Array Data Pin
Member 1427108416-Apr-19 12:11
memberMember 1427108416-Apr-19 12:11 

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.