Click here to Skip to main content
15,902,447 members
Home / Discussions / C#
   

C#

 
QuestionC# Pin
Crazy vivek7-Aug-06 23:32
Crazy vivek7-Aug-06 23:32 
AnswerRe: C# Pin
Colin Angus Mackay7-Aug-06 23:51
Colin Angus Mackay7-Aug-06 23:51 
AnswerRe:C# Pin
Girish6018-Aug-06 0:15
Girish6018-Aug-06 0:15 
AnswerRe: C# Pin
Ramasubramaniam12-Aug-06 4:23
Ramasubramaniam12-Aug-06 4:23 
Questionhelp in moving dial knob with mouse [modified] Pin
codeprojecti7-Aug-06 23:24
codeprojecti7-Aug-06 23:24 
QuestionSending mail with attachment Pin
seee sharp7-Aug-06 23:14
seee sharp7-Aug-06 23:14 
AnswerRe: Sending mail with attachment Pin
Ramasubramaniam8-Aug-06 10:39
Ramasubramaniam8-Aug-06 10:39 
Questionweird behavior when removing controls :S Pin
kkadir7-Aug-06 22:42
kkadir7-Aug-06 22:42 
Hi everyone,

I'm trying to write a simple program that reads paths from an xml file and then display thumbnails in a panel. While a user may resize the form I thought I should recalculate and redraw the thumbnail list because -for instance- in the default view we have three columns but when the user maximize the window we need lets say 6 columns.
So I try to get every child control -in this case pictureBox- with a foreach loop, and then dispose them. But weirdly when I resize the form only the 1st and 3rd column disappears, and when I resize it again the the 4th column dissapears, and again a resize 1st-3rd-5th...rows disappear of the 2.n column and so forth. I tried to debug and trace what can cause this weird behavior but find nothing.
I also tried the Remove() method for ControlCollection but its the same sh*t.Mad | :mad:
Here is my code :
private void onFormResize(object sender, EventArgs e)<br />
        {            <br />
            foreach (Control c in panel3.Controls)<br />
            {<br />
                panel3.Controls.Remove(c);<br />
                //c.Dispose()<br />
            }            <br />
        }<br />


Anyone have an idea ?

PS : Also is there another more "handy" method to make the column count fit the just-width of the panel ?

Best regards..!

.:: Something is Wrong ::.

AnswerRe: weird behavior when removing controls :S Pin
Corinna John8-Aug-06 1:10
Corinna John8-Aug-06 1:10 
AnswerRe: weird behavior when removing controls :S [modified] Pin
Colin Angus Mackay8-Aug-06 1:47
Colin Angus Mackay8-Aug-06 1:47 
GeneralRe: weird behavior when removing controls :S Pin
kkadir8-Aug-06 3:42
kkadir8-Aug-06 3:42 
QuestionAbout assemblies Pin
nesaraja7-Aug-06 21:08
nesaraja7-Aug-06 21:08 
AnswerRe: About assemblies Pin
albCode7-Aug-06 22:23
albCode7-Aug-06 22:23 
GeneralRe: About assemblies Pin
nesaraja7-Aug-06 22:59
nesaraja7-Aug-06 22:59 
QuestionHelp in TCP Connection Pin
Kamleshs7-Aug-06 20:53
Kamleshs7-Aug-06 20:53 
AnswerRe: Help in TCP Connection Pin
stancrm7-Aug-06 20:55
stancrm7-Aug-06 20:55 
GeneralRe: Help in TCP Connection Pin
leppie7-Aug-06 20:58
leppie7-Aug-06 20:58 
AnswerRe: Help in TCP Connection Pin
leppie7-Aug-06 20:56
leppie7-Aug-06 20:56 
QuestionPlease help Pin
minniemooo7-Aug-06 20:47
minniemooo7-Aug-06 20:47 
AnswerRe: Please help Pin
albCode7-Aug-06 21:30
albCode7-Aug-06 21:30 
GeneralRe: Please help Pin
minniemooo7-Aug-06 22:16
minniemooo7-Aug-06 22:16 
GeneralRe: Please help Pin
albCode7-Aug-06 22:26
albCode7-Aug-06 22:26 
Questionrunning application with out framework Pin
Satish327-Aug-06 20:43
Satish327-Aug-06 20:43 
AnswerRe: running application with out framework Pin
leppie7-Aug-06 20:49
leppie7-Aug-06 20:49 
AnswerRe: running application with out framework Pin
stancrm7-Aug-06 20:53
stancrm7-Aug-06 20:53 

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.