I see InspectorBarItems have a ReadOnly property, but no Enabled
property. So, although the item does not get the focus, it is also not
shown in a greyed-out manner.
1 Is it possible (through OnDraw,
OnPaint type events?) to draw an item that is read-only in a disabled
style? If so, how might one go about doing that?
2 Is it possible to
get access to the control associated with the InspectorItem and
manipulate its properties? For example, if the PropertyType is
ptButton, is there a way to access that button? I tried to see what the
ItemObjct propertyt was, but that didn't seem to be related.
3 Is it
possible to show the InspectorItem that has the focus with a different
background color. In the default style that I am using at least, the
item that has the focus isn't indicated much differently than the
others.
This is in regard to a Panel in the psProperties style.
- If you want to have readonly items displayed in a different way, you'd need to do custom drawing of the item using the OnItemDraw() event. In OnItemDraw, you can write code like:procedure TForm2.InspectorBar1ItemDraw(Sender: TObject;AInspectorItem: TInspectorItem; ACanvas: TCanvas; ARect: TRect;var DefaultDraw: Boolean);beginif AInspectorItem.ReadOnly thenbeginACanvas.Font.Color := clSilver;ACanvas.TextOut(ARect.Left, ARect.Top, AInspectorItem.Caption);DefaultDraw := false;end;end;2. Several inplace editor controls are accessible, i.e. InspectorBar.Combo, InspectorBar.Edit, InspectorBar.DateTimePicker, InspectorBar.Spin, .... The button is not accessible, as we do not use a real TButton to show a button for an item.3. Would also have to be done using the technique as explained in 1)