Hello,
I tried to change the font settings of TInspectorItems at runtime. The TInspectorPanel->Style is set to psProperties
When I put the following code in the OnItemClick event of the InspectorBar, the code is executed but nothing happens:
void __fastcall TForm1::InspectorBar1ItemClick(TObject *Sender,
TInspectorPanel *AInspectorPanel, TInspectorItem *AInspectorItem)
{
AInspectorItem->FontValue->Color = clBlack;
AInspectorItem->FontValue->Style = AInspectorItem->FontValue->Style << fsBold;
}
How can I change the font setting of an item at runtime?
Regards
The setting for InspectorItem.FontValue apply to the FontValue of the item, i.e. the edited value when the PropertyType of the item is chosen. The FontValue doesn't apply to the label of the item.The font of the item label is global per InspectorPanel and is set with InspectorPanel.CaptionFont.
Ok, thx. but the font of the value doesn't change either
I cannot see this here.
Doesn't work here when set in ItemClick event handler:
void __fastcall TForm1::InspectorBar1ItemClick(TObject *Sender,
TInspectorPanel *AInspectorPanel, TInspectorItem *AInspectorItem)
{
AInspectorItem->FontValue->Name = "COURIER NEW";
}
InspectorBar version= 1.8.0.0
I retested this with the latest version v1.8.1.1 with the code:
Don't know. Isn't working here, but I don't mind as I am using an Icon now to mark an item as selected.
This was just what I observed when trying to change the item font.
If you say it's ok, then fine...
Have a nice WE
Regards