Derek Guest
|
Posted: Wed Dec 31, 2003 7:50 pm Post subject: TCustomPanel and InflateRect-FillRect-CopyRect |
|
|
I need two panel components. One needs to duplicate the look-and-feel of MS
Word's ruler, right down to that little graphic on the left end which shows
the particular tab style. The other should be similar to a progressbar, but
also needs to support graphics on either or both ends of the component-but,
obviously not part of the section where the actual progress is incrementing.
OK. I've got a new component derived from TCustomPanel, and I can draw a
ruler with ticks in inches, centimeters and pixels. However, after I draw
the ticks on my TRect and paint the TRect on my panel's Canvas, I lose the
BevelInner and BevelOuter.
I *think* that I need to use InflateRect or OffsetRect to resize and
reposition the ruler TRect inside the ClientRect of the panel component, but
I'm having the devil of a time figuring out how to do this. Can anyone post
a simple panel component example that shows how to work this? Also, if I
plan to display a fixed-size graphic on one end of this panel, should I use
InflateRect to resize the ruler TRect to shift the ruler section clear of
the area where I want the graphic? And do I use CopyRect to place the
graphic where I want it on the panel's ClientRect?
Thanx in advance.
Derek Benner
delphidb-AT-comcast-DOT-net
|
|