1

As the title implies, I am trying to figure out how to use an image as a button in my delphi app.Currently the buttons look like below

I would like the buttons to look more like this more or less.

enter image description here

Are there any resources or tutorials that anyone could recommend on which component I would use for this and how to go about using it properly?/

Gary Becks
  • 887
  • 2
  • 13
  • 21
  • 4
    An ImageList with png images and toolbar buttons or buttons with Images and ImageIndex properties assigned generally works fine. – Sertac Akyuz Nov 18 '12 at 18:21

2 Answers2

2

you can made it without external component with TSpeedButton

active flat property .

and use in glyph bitmap...

your bitmap must with alpha channel...

for example : http://0777.ir/img/alpha.bmp

this bitmap have alpha channel...

you can see the channels in adobe photoshop.

A1Gard
  • 4,070
  • 4
  • 31
  • 55
  • Hi, is there a source for obtaining these images that you know of? I don't own or use photoshop. – Gary Becks Nov 18 '12 at 20:04
  • 1
    @Gary You'll need to obtain the images for yourself. No programming there. You need a designer. – David Heffernan Nov 18 '12 at 22:15
  • Yes this need to photoshop design work , now programming work – A1Gard Nov 18 '12 at 22:38
  • If you cannot afford Photoshop or a designer, you can do-it-yourself with Gimp. – Penguino Nov 18 '12 at 22:52
  • Thanks, I was thinking more along the lines of stock ready images in that format, something like iconfinder.com – Gary Becks Nov 18 '12 at 23:20
  • @Gary - If it was pngs you were searching for you could have a look at http://stackoverflow.com/questions/2235226/copyright-free-collection-of-resource-images-for-delphi-menu-items-and-toolbar-b   With bmps, you'll constrain your search quite a bit. Then again, if you're determined, you can convert pngs to bitmaps with alpha channel f.i. with GIMP as Penguino mentioned. – Sertac Akyuz Nov 19 '12 at 00:28
  • Correction: alpha channel is not required. Delphi can re-create alpha channel for indexed (palettee-based) images, with tha rule that left-top pixel colour would be turned into transparent ones. That is how standard TBitBtn glyphs like OK/Cancel are done, they use Fuchsia they in the runtime is turned to be transparent. – Arioch 'The Nov 19 '12 at 12:11
1

Use a Delph TSpeedButton as already mentioned. To answer your question about stock images, there are some free image sets you might find appropriate here: http://www.freedownloadmanager.org/download/delphi-16x16-speed-button-icon-bmp-1599703.html . I have not tried them. One of these might be what you need to get started. Yes, there are other places to get the resources... google 16 x 16 Glyphs or icons or images. There used to be several free tools to design your own icons..one comes to mind Icon Edit ( http://www.bouffler.freeserve.co.uk/icon_edit.htm ), if you google, look for a shareware tool by the same name with a version number. And there are numerous commercial products.

SteveJG
  • 256
  • 1
  • 8