using GetItemByName in Tinspector

Hi

I would like to find an Item into a TinspectorBar by its Name
That's possible

  // 1.8.5.0 : New : Name property added to TInspectorItem

  //         : New : InspectorPanel.Items.Items.Item[Name] added to access items by name


But I didn't succes :(
Could you help me ?
regards
olivier

What is the exact problem you have?


I cannot see a problem here. When some item in the Panel has name 'BLABLA' , I can get a reference to the item with Panel.Items.Item['BLABLA']
Hi
Thanks for your answer.
In fact, I didn't how to do.
I try to use your syntax as :
fSession_Accessoire.list_Accessoire_Session.Panels.Items.Item['BLABLA'];

But I receive this message from the compiler :
"[dcc32 Erreur] Affiche.pas(10929): E2029 '[' attendu(e) mais '.' trouv?(e)"
and it is logic.

if I use your exact sentence (Panels without s)
    fSession_Accessoire.list_Accessoire_Session.Panel.Items.Item['BLABLA'];
I receive this message :
[dcc32 Erreur] Affiche.pas(10929): E2003 Identificateur non d?clar? : 'Panel'

Thats why I don't know how to do. What I do wrong ?
regards
olivier

This was retested here with a default InspectorBar dropped on the form and for the 3 items added, the Name value was set to 'A', 'B', 'C'.

Testing the code to access an item by name, this works without any issue here:


var
  plit: TInspectorItem;
begin
  plit := inspectorbar1.Panels[0].Items.Item['A'];
  plit.Caption := 'updated';
end;

Hi

In fact, I used Panels without an Index that's incorrect.
With an Index like in your example, it works, but that's means the "Item" function works only inside a specific panel of the TInspectorBar an not in the entire TInspectorBar (sad).

Regards

olivier

Yes, it is a function at panel level as items belong to a panel.

Ok

Possibility to add into a next version the possibility looking for in all panels ? ;)


We will add it in the next update.

great :)