Subject | Re: [IBO] TIB_Updatebar Glyhps Color |
---|---|
Author | radevojvodic |
Post date | 2004-02-17T07:50:27Z |
Hi there,
This is a part of the larger issue related to change anything in IBO
look. The best way to change these glyphs is to change res file for
UpdateBar. In a fact, I changed IBO packages to put dcu files in a
LIB subfolder of IBObjects folder. Then I just copied all the res
files and neccessery dfm files (the ones i wanted to change) in that
folder. This way i change all the res files (the glyphs in those
files) and dfm files in a lib folder so in runtime i get appropriate
look of my applications. Also, if dcu's are in a different folder
delphi won't compile them every time you compile your application.
Another + of this solution is that you don't have to do it on every
form you make and you don't have an extra TImageList in a form.
Rade.
This is a part of the larger issue related to change anything in IBO
look. The best way to change these glyphs is to change res file for
UpdateBar. In a fact, I changed IBO packages to put dcu files in a
LIB subfolder of IBObjects folder. Then I just copied all the res
files and neccessery dfm files (the ones i wanted to change) in that
folder. This way i change all the res files (the glyphs in those
files) and dfm files in a lib folder so in runtime i get appropriate
look of my applications. Also, if dcu's are in a different folder
delphi won't compile them every time you compile your application.
Another + of this solution is that you don't have to do it on every
form you make and you don't have an extra TImageList in a form.
Rade.
--- In IBObjects@yahoogroups.com, Paul Vinkenoog <paul@v...> wrote:
> Hello Rainer,
>
> >> Not that I know of. I changed the colors too in some apps; had to
> >> make my own glyphs - which is a piece of cake by the way.
>
> > It sure is, if you know what you are doing....
> > I just tried that, but somehow my glyphs don't look very good :-(
>
> > At design time they are not shown at all
>
> Unless you connect to the db and activate the query. By default, IBO
> leaves a disabled button empty if it has a custom glyph. This is
true
> at both design time and runtime. (I'll describe the solution in a
> minute.)
>
> > and at runtime it looks like I have a little mismach in the order.
>
> I don't know what causes that, but read on.
>
> > Is it necessary to have custom glyphs for all possible buttons, or
> > is it enough, to supply only the ones needed?
>
> Only the ones you need. This is how you do it:
>
> 1: You create your custom glyphs and save them to disk as BMP or
ICO.
> 2: You drop an ImageList on your form and load the glyphs into it.
> 3: Then you set the UpdateBar's CustomGlyphs property to point to
> that ImageList.
> 4: Then you expand CustomGlyphsSupplied and change the value to true
> for every glyph type you supplied.
>
> You must repeat steps 3 and 4 for every UpdateBar you want to appear
> your custom glyphs on.
>
>
> Now, to get back to the empty button problem: if a button with a
> custom glyph is inactive it won't be shown greyed, but empty. This
> is a minor annoyance at design time, but outright unacceptable at
> runtime.
>
> To solve this problem you must:
>
> 1: Create every custom glyph as a pair, with each pair in one image:
> the left half shows the active glyph, the right half the disabled
> glyph. [ I'll send you a small example privately ]
> 2: At runtime, for every custom glyph used, and in every bar you use
> it in, call this code:
> UpdBar1->Buttons[ ubInsert ]->NumGlyphs = 2;
> UpdBar1->Buttons[ ubCancel ]->NumGlyphs = 2;
> UpdBar2->Buttons[ ubInsert ]->NumGlyphs = 2;
> UpdBar2->Buttons[ ubCancel ]->NumGlyphs = 2;
> etc...
> You can put this code (adapted to your situation of course!) e.g.
> in your Form's OnCreate or OnShow handler.
>
>
> > Are there any tutorials on how to achieve nice results?
>
> You said you only wanted to change the color. I do that like this:
> Make a screenshot of your form (with active buttons!) using Alt-
PrtSc.
> Then paste the screenshot into a graphics program. Crop it so that
it
> only contains the glyph you want to change. Change your glyph's
> colors. Then copy the glyph to the clipboard. Double the width of
the
> graphic, the glyph should stay on the left. Paste the clipboard onto
> the empty right half of the graphic. Edit the right half to make it
> grey (or whatever you want for a disabled icon). Now save the double
> glyph, and be proud of it - you're an artist! :-)
>
>
> Hope this helps,
> Paul Vinkenoog
>
>
> PS:
> You can't set NumGlyphs to 2 at design time. Nothing to do about it.