Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Inserting an Icon into a Command button

Status
Not open for further replies.

DavePilot

Programmer
Feb 12, 2002
12
US
I'm trying to figure out how to duplicate an effect like one in Outlook. In outlook if you select Tools/Accounts the Add button has a arrow (right facing triangle) in it. Any ideas on how to insert something like that into a command button??

Thanks,
Dave
 
Take a look at the alignment of the text of the ADD button along with the other buttons below.

Do you see that the 'Add/ word is not aligned at the center of the button (relative to the other buttons).

This probably means that the ARROW is not a graphic but a special character. You can use the Character Map utility to select a Font that has this character in.

As for the pop-up menu it is simply a _Click event procedure.

Hope that helped.


Random is what we can't see
Devine is what we can't understand
and If 1=2 then I'm the pope
 
Hi,

A very simple way is to put a frame on the button then arrange a label and an image on the frame. For the button to still work the frame has to be disabled.

Jon
 
I've looked for a font with the triangle in it. There isn't one that has the triangle and text. Only picture fonts seem to contain it. Drat.

Dave
 
Hi,
Set the Command button's Style to Graphical and then set the Picture or Icon property ( I don't remember which ) to the picture that you want to appear on the Command Button. You can browse and select this image by clicking on the .. button next to the Icon property. Hope it helps. Let me know what happens.
With regards,
PGK
 
In addition to what pgk says you could create a .BMP picture
of the text "ADD >" and put in the command button.

Make sure you eliminate the caption of the button.

pgk, if you do that the icon/bitmap will appear above or on top of the caption (not good !!!).
Random is what we can't see
Devine is what we can't understand
and If 1=2 then I'm the pope
 
Hi,
Eliminating the caption might be a good idea when the icon represens very clearly what the command button's use is. If it does not, having the caption might not be such a bad idea.

In any case, make sure that there is a valid ToolTi Text in place for the button. Hope it helps. Let me know what happens.
With regards,
PGK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top