TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
nitinwebdev
NA
1
0
Pen Color Change
Jan 11 2005 1:37 AM
I am drawing lines of different colors based on a criteria. I have an If Else loop and when the panel paint event is called it selects the color specified in the else statement by default. Kinda overrides the color in the if statement. So all the lines turn out be blue. Here is the code: foreach(Line l in Lines) { if(locallink!=null) { char charfileindex1='#'; int charfileindexlen1=locallink.Split(charfileindex1).Length; string[] ss=new string[charfileindexlen1]; ss=locallink.Split(charfileindex1); for(int i=0; i { //int index=ss[i].IndexOf(dragimage); if(checklinks(ss[i].ToString())> 0) { //draws red line DrawAssocLine(l); label4.Text="Red"+k.ToString(); k++; } else { //draws blue line DrawLine(l); label5.Text="Blue"+m.ToString(); m++; } } } } Region r = getRegionByLine(line,p); thumbnailpanel.Invalidate(r); thumbnailpanel.Update(); r.Dispose();
Reply
Answers (
0
)
Closing a Child Form
C# user control with sockets used as activeX component