This is a very simple component that adds an icon to the classic TextBox. Size of the icon is 24x24.
Besides the standard events and properties you have the Icon property to set the icon itself. You also have IconClick and IconDblClick events that will be reaised if the icon is clicked. Standard Click/DblClick events apply to the textbox itself.
Because the icon is a picturebox superimposed on the textbox, the height od the control and therefore textbox are limited to standard size, and there's also no multiline. This doesn't work well with changing font sizes because of that. I whipped this up quickly so it might be added in a future version.
I think you can add a watermark kind of text(like in Opera) as an additional property. So, if anyone wants to use it as a search box, it will be useful. Just a suggestion...
If my post was helpful to you, then express your gratitude using Rate this Post.
And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video) My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet Social Group:VBForums - Developers from India
You mean like that 'ghost text', what ever it's called that appears in grey when the box is empty, saying like "Enter keywords here" and when you click or start typing it disappears? That would be a nice addition. I'll also work on option to align the icon to the left or right, and to allow vertical sizing to with the icon automatically adjusting to the height.
I just made this real quick as a response to a thread in VB Classic forum, didn't think much about additional features at the time.
You mean like that 'ghost text', what ever it's called that appears in grey when the box is empty, saying like "Enter keywords here" and when you click or start typing it disappears? That would be a nice addition. I'll also work on option to align the icon to the left or right, and to allow vertical sizing to with the icon automatically adjusting to the height.
Yep....
If my post was helpful to you, then express your gratitude using Rate this Post.
And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video) My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet Social Group:VBForums - Developers from India