Click here to Skip to main content
15,908,775 members
Home / Discussions / C#
   

C#

 
AnswerRe: count specific character in string Pin
Nicholas Butler24-Oct-06 22:32
sitebuilderNicholas Butler24-Oct-06 22:32 
AnswerRe: count specific character in string Pin
Guffa24-Oct-06 22:58
Guffa24-Oct-06 22:58 
Questionhow to use the printDialogBox? Pin
quiteSmart24-Oct-06 20:11
quiteSmart24-Oct-06 20:11 
AnswerRe: how to use the printDialogBox? Pin
Nader Elshehabi24-Oct-06 22:03
Nader Elshehabi24-Oct-06 22:03 
GeneralRe: how to use the printDialogBox? Pin
quiteSmart24-Oct-06 22:43
quiteSmart24-Oct-06 22:43 
QuestionHow can I add the assembly Microsoft.Office.Interop.Outlook? Pin
OctopusThu24-Oct-06 19:26
OctopusThu24-Oct-06 19:26 
AnswerRe: How can I add the assembly Microsoft.Office.Interop.Outlook? Pin
OctopusThu24-Oct-06 19:36
OctopusThu24-Oct-06 19:36 
QuestionCustom Draw TreeView problem - Painted "+" got overriden Pin
DiegoValdevino24-Oct-06 19:18
DiegoValdevino24-Oct-06 19:18 
I am creating a custom draw treeview with level 0 treenodes draw by the code below. I want to paint the entire node row, including behind the PlusMinus button with a color of choice.
The problem happens with my code running after the PlusMinus button is painted,thus erasing it. Is there some event fired before OnDrawNode painting the "+" that i am missing and should override?
Setting a breakpoint on the begining of OnDrawNode and seeing the control, shows me the "+" is already painted.

protected override void OnDrawNode(DrawTreeNodeEventArgs e){
if (e.Node.Level == 0){
Rectangle nodeRegion = new Rectangle(ClientRectangle.X, e.Node.Bounds.Y, ClientRectangle.Width, e.Node.Bounds.Height);

SolidBrush nodeBackColor = new SolidBrush(Color.BlanchedAlmond);
SolidBrush nodeForeColor = new SolidBrush(Color.Black);

Font nodeFont = (e.Node.NodeFont == null) ? this.Font : e.Node.NodeFont;

e.Graphics.FillRectangle(nodeBackColor, nodeRegion); // PROBLEM
e.Graphics.DrawString(e.Node.Text.Trim(), nodeFont, nodeForeColor, e.Node.Bounds.Location);
}
else{
e.DrawDefault = true;
}
base.OnDrawNode(e);
}

ps.: It looks like the OnPaint event isnt fired on a TreeView. Couldnt find why is this on MSDN.

Thanks!

Diego Valdevino
QuestionCustom UserControl shape problem... Pin
Kasic Slobodan24-Oct-06 16:08
Kasic Slobodan24-Oct-06 16:08 
AnswerRe: Custom UserControl shape problem... Pin
Kasic Slobodan27-Oct-06 7:31
Kasic Slobodan27-Oct-06 7:31 
QuestionApplication.Exit(); not working in the form constructor, why? Pin
AngryC24-Oct-06 14:57
AngryC24-Oct-06 14:57 
AnswerRe: Application.Exit(); not working in the form constructor, why? Pin
Nader Elshehabi24-Oct-06 15:22
Nader Elshehabi24-Oct-06 15:22 
GeneralRe: Application.Exit(); not working in the form constructor, why? Pin
AngryC24-Oct-06 16:31
AngryC24-Oct-06 16:31 
GeneralRe: Application.Exit(); not working in the form constructor, why? Pin
EricT.25-Nov-10 7:27
EricT.25-Nov-10 7:27 
QuestionSearch for statements in CS files. Pin
Alex Iagovsky24-Oct-06 14:34
Alex Iagovsky24-Oct-06 14:34 
AnswerRe: Search for statements in CS files. Pin
Nader Elshehabi24-Oct-06 15:29
Nader Elshehabi24-Oct-06 15:29 
GeneralRe: Search for statements in CS files. Pin
Alex Iagovsky25-Oct-06 3:19
Alex Iagovsky25-Oct-06 3:19 
QuestionForms Pin
m.m._200724-Oct-06 14:07
m.m._200724-Oct-06 14:07 
AnswerRe: Forms [modified] Pin
Nader Elshehabi24-Oct-06 15:40
Nader Elshehabi24-Oct-06 15:40 
AnswerRe: Forms Pin
phenix-burn24-Oct-06 15:42
phenix-burn24-Oct-06 15:42 
QuestionSocket class Poll method and POP3 client Pin
Martin Lachowicz24-Oct-06 13:00
Martin Lachowicz24-Oct-06 13:00 
QuestionCounting months between dates? Pin
rbaut24-Oct-06 12:08
rbaut24-Oct-06 12:08 
AnswerRe: Counting months between dates? Pin
Guffa24-Oct-06 12:15
Guffa24-Oct-06 12:15 
QuestionWhy doesn't the left mouse button work... [modified] Pin
new_phoenix24-Oct-06 11:19
new_phoenix24-Oct-06 11:19 
QuestionCollectionEditor and Generics Pin
Jamie Nordmeyer24-Oct-06 10:43
Jamie Nordmeyer24-Oct-06 10:43 

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.