You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ITSM/.svn/pristine/ee/ee288fd184357479d76009b6be6...

136 lines
5.7 KiB

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML xmlns:MSHelp="http://msdn.microsoft.com/mshelp" DIR="LTR"><HEAD>
<meta name="GENERATOR" content="VBdocman .NET - documentation generator; http://www.vbdocman.com">
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=UTF-8">
<TITLE>ComboBoxTreeClass.OnDrawItem -Methode</TITLE>
<xml>
<MSHelp:TOCTitle Title="ComboBoxTreeClass.OnDrawItem -Methode"/>
<MSHelp:RLTitle Title="ComboBoxTreeClass.OnDrawItem -Methode"/>
<MSHelp:Keyword Index="A" Term="topic_0000000000000C3C"/>
<MSHelp:Keyword Index="K" Term="ComboBoxTreeClass.OnDrawItem -Methode"/>
<MSHelp:Keyword Index="K" Term="Vertragsverwaltung.Controls.ComboBoxTreeClass.OnDrawItem -Methode"/>
<MSHelp:Keyword Index="F" Term="Vertragsverwaltung.Controls.ComboBoxTreeClass.OnDrawItem"/>
<MSHelp:Keyword Index="F" Term="ComboBoxTreeClass.OnDrawItem"/>
<MSHelp:Keyword Index="F" Term="Vertragsverwaltung.Controls.ComboBoxTreeClass.ComboBoxTreeClass.OnDrawItem"/>
<MSHelp:Attr Name="DevLang" Value="VB"/>
<MSHelp:Attr Name="DevLangVers" Value="kbLangVB"/>
<MSHelp:Attr Name="DocSet" Value="Visual Basic"/>
<MSHelp:Attr Name="DocSet" Value="Visual Studio"/>
<MSHelp:Attr Name="DocSet" Value="VSM"/>
<MSHelp:Attr Name="Product" Value="VB"/>
<MSHelp:Attr Name="ProductVers" Value="kbVBp700"/>
<MSHelp:Attr Name="Product" Value="VSA"/>
<MSHelp:Attr Name="ProductVers" Value="kbVSA"/>
<MSHelp:Attr Name="Technology" Value="ManagedCode"/>
<MSHelp:Attr Name="TechnologyVers" Value="kbManagedCode"/>
<MSHelp:Attr Name="TopicType" Value="kbSyntax"/>
<MSHelp:Attr Name="TargetOS" Value="Windows"/>
<MSHelp:Attr Name="Locale" Value="kbEnglish"/>
</xml>
<META name="rtfFileName" content="">
<META NAME="save" CONTENT="history">
<!--CSS_START-->
<SCRIPT SRC="MSHelp/scripts/dtuelink.js"></SCRIPT>
<!--CSS_END-->
<SCRIPT language="JavaScript">
function indent(level) {
for (i=1; i<=level; i++) {
document.write("&nbsp;&nbsp;&nbsp;");
}
}
</SCRIPT>
</HEAD>
<body topmargin=0 id="bodyID" class = "dtBODY"><!--NONSCROLLING BANNER START-->
<div id="nsbanner">
<div id="bannerrow1">
<TABLE CLASS="bannerparthead" CELLSPACING=0>
<TR ID="hdr">
<TD CLASS="runninghead" nowrap>Vertragsverwaltung-Klassenbibliothek</TD>
<TD CLASS="product" nowrap>&nbsp;</TD>
</TR>
</TABLE>
</div>
<div id="TitleRow">
<H1 class="dtH1"><A NAME="topic_0000000000000C3C"></A>ComboBoxTreeClass.OnDrawItem -Methode</H1>
</div></div>
<!--NONSCROLLING BANNER END-->
<DIV id="nstext" valign="bottom"><!---->
<PRE class="syntax"><SPAN class="lang">[Visual&nbsp;Basic]
</SPAN><B>Protected Overrides Sub OnDrawItem( _&nbsp;<br> ByVal <i>e</i> As <a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemWindowsFormsDrawItemEventArgsClassTopic.htm">DrawItemEventArgs</a> _&nbsp;<br>)</B></PRE>
<H4 class="dtH4">Parameter</H4>
<dl>
<dt><i>e</i></dt>
<dd></dd>
</dl>
<H4 class="dtH4">Quellcode</H4>
<pre class="code"><SPAN class="lang">[Visual&nbsp;Basic]</SPAN>
Protected Overrides Sub OnDrawItem(ByVal e As System.Windows.Forms.DrawItemEventArgs)&nbsp;<br> If e.Index = -1 Then Return&nbsp;<br>&nbsp;<br> ' Draw only the combo edit box&nbsp;<br> If (e.State And DrawItemState.ComboBoxEdit) &lt;&gt; DrawItemState.ComboBoxEdit Then Return&nbsp;<br>&nbsp;<br> Dim ComboBoxSelection As TreeNodeEx&nbsp;<br>&nbsp;<br> Try&nbsp;<br> ComboBoxSelection = CType(Me.Items(e.Index), TreeNodeEx)&nbsp;<br>&nbsp;<br> e.DrawFocusRectangle()&nbsp;<br> e.DrawBackground()&nbsp;<br>&nbsp;<br> Dim TextLeft As Integer = e.Bounds.Left&nbsp;<br>&nbsp;<br> If Not Me.TreeView.ImageList Is Nothing Then&nbsp;<br> Dim ImageIndex As Integer = ComboBoxSelection.TreeNode.SelectedImageIndex&nbsp;<br> If ImageIndex &lt; 0 Then ImageIndex = Me.TreeView.SelectedImageIndex&nbsp;<br> If ImageIndex &gt;= 0 Then&nbsp;<br> Dim IconRectangle As Rectangle&nbsp;<br>&nbsp;<br> If Me.TreeView.ImageList.ImageSize.Height &gt; Me.ItemHeight Then&nbsp;<br> IconRectangle = New Rectangle(e.Bounds.Left + 2, e.Bounds.Top, Me.ItemHeight, Me.ItemHeight)&nbsp;<br> Else&nbsp;<br> IconRectangle = New Rectangle(New Point(e.Bounds.Left + 2, e.Bounds.Top), Me.TreeView.ImageList.ImageSize)&nbsp;<br> End If&nbsp;<br>&nbsp;<br> Me.TreeView.ImageList.Draw(e.Graphics, IconRectangle.Left, IconRectangle.Top, IconRectangle.Width, IconRectangle.Height, ImageIndex)&nbsp;<br> TextLeft = TextLeft + IconRectangle.Width + 2&nbsp;<br>&nbsp;<br> IconRectangle = Nothing&nbsp;<br> End If&nbsp;<br> End If&nbsp;<br>&nbsp;<br> e.Graphics.DrawString(ComboBoxSelection.TreeNode.Text, Me.Font, New SolidBrush(e.ForeColor), TextLeft, e.Bounds.Top + 2)&nbsp;<br> Catch ex As Exception&nbsp;<br> Throw ex&nbsp;<br> Finally&nbsp;<br> ComboBoxSelection = Nothing&nbsp;<br> MyBase.OnDrawItem(e)&nbsp;<br> End Try&nbsp;<br> End Sub
</pre>
<H4 class="dtH4">Forderungen</H4>
<P><b class="le">Plattformen:&nbsp;</b>Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition</P>
<H4 class="dtH4">Siehe auch</H4>
<p>
<a href="topic_0000000000000C2E.html">ComboBoxTreeClass</a>
</p>
<DIV CLASS="footer">
<HR>
Generated by VBdocman .NET
<p>
</div></div>
</BODY>
</HTML>