开发者

Image editor colour problems (transparency?)

开发者 https://www.devze.com 2023-01-16 08:49 出处:网络
D7: I created an edit box component which only accepts integers. I want to create a buttonbar icon for it based on TEdit.

D7: I created an edit box component which only accepts integers. I want to create a buttonbar icon for it based on TEdit.

TEDit shows "ABC" and a cursor on a white background. I copied and, pixel by pixel, changed ABC to 123. However, while TEdit shows a white background, mine shows gray.

The pixels are definitely white but s开发者_开发百科how up the same colour as the background. Can I have set white=transparent somehow?

Nope, I filled the white with lime green & saved everything but it still shows up gray on the button bar.

Any idea what I am doing wrong?

(and any hints on the best way to create images? use built in tool or external? or any great web sites with lots of free buttons?


if you are trying of add an image for your component, you can use any application you want to generate the image, just you must follow the next guidelines.

  • the format must be a BMP of 16 or 256 colors.
  • must be of 24x24 pixels
  • The lower-left pixel of the image defines the transparent color, so every occurrence of that color is automatically replaced with the color of the toolbar components background. for default delphi uses the clFuchsia (clFuchsia: TColor = $FF00FF) color for this.

see these samples images (zoom x 8)

this image must appear filled (check the clFuchsia lower-left pixel) in the toolbar pallete (The clFuchsia pixel is not necessary, is only to show the location).

Image editor colour problems (transparency?)

In this case the image will have a transparent background

Image editor colour problems (transparency?)

try out these links for glyph images

  • Delphi-Box's Glyph-Collection
  • from the 2005 version of Delphi, is include an free collecion of images , you can find on this path C:\Program Files\Common Files\CodeGear Shared\Images\GlyFX
  • Glyfx Site (Excellents icons, but you must paid)
0

精彩评论

暂无评论...
验证码 换一张
取 消