﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum / General .NET Discussion / .NET Forums  / How to "ownerdraw" a textbox / Latest Posts</title><generator>InstantForum.NET v4.1.4</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>forum@strataframe.net</webMaster><lastBuildDate>Thu, 08 Jan 2009 11:19:10 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: How to "ownerdraw" a textbox</title><link>http://forum.strataframe.net/Topic14203-14-1.aspx</link><description>Thanks!  I'll look into this.</description><pubDate>Fri, 08 Feb 2008 11:41:59 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: How to "ownerdraw" a textbox</title><link>http://forum.strataframe.net/Topic14203-14-1.aspx</link><description>One other thought....you may want to use the TextBoxRenderer class to help you generate the standard background, etc instead of manually reinventing the wheel.  You can have it draw the standard background to a device context (graphics) so this way you can just render what the text and what you want to add.</description><pubDate>Fri, 08 Feb 2008 11:31:48 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: How to "ownerdraw" a textbox</title><link>http://forum.strataframe.net/Topic14203-14-1.aspx</link><description>Inherit a textbox, the in the constructor call the SetStyle method:&lt;/P&gt;&lt;P&gt;[codesnippet]SetStyle(UserPaint, True)[/codesnippet]&lt;/P&gt;&lt;P&gt;When you do this, you can then override the OnPaint method and get to rendering:&lt;/P&gt;&lt;P&gt;[codesnippet]Protected Overrides Sub OnPaint(...)&lt;BR&gt;   '-- e.Graphics.GetToRendering &lt;BR&gt;End Sub[/codesnippet]</description><pubDate>Fri, 08 Feb 2008 11:08:07 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>How to "ownerdraw" a textbox</title><link>http://forum.strataframe.net/Topic14203-14-1.aspx</link><description>I'd like to have a TextBox with a button beside it (it will "zoom" in on the contents by opening another form).  However, as you know, there is no OwnerDraw for text boxes (at least I couldn't find it).  I attempted a UserControl, that that was waaaaay too much work and a bit wanky to boot because I need a TextBox in all its glory, plus a something clickable right beside it.  &lt;br&gt;&lt;br&gt;To recap:  I want a SF TextBox with some clickable element beside it (maybe a label with an image or a button).  I'd like this to be a single control that I drop on the form, rather than two (I use this a lot).  &lt;br&gt;&lt;br&gt;So, any ideas on how I might do this?&lt;br&gt;&lt;br&gt;Thanks!</description><pubDate>Fri, 08 Feb 2008 10:50:32 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item></channel></rss>