I want to use the Objects property of a TRzCheckList.Items (assuming there
is one) to store a numerical (integral) value corresponding to each of the
displayed strings in the list box.

How do I use an Object property (declared as TObject) to do this? Do I
create my own class and put an integer field in it? Or use something like
this example in Delphi help, which casts things to TObjects and then later
casts them back to the appropriate type

    // Add View styles and constants to the Combo Box
    ComboBox1.Items.AddObject('vsIcon', TObject(vsIcon));
    ComboBox1.Items.AddObject('vsList', TObject(vsList));
    ComboBox1.Items.AddObject('vsReport', TObject(vsReport));
    ComboBox1.Items.AddObject('vsSmallIcon', TObject(vsSmallIcon));


  with ComboBox1 do
    ListView1.ViewStyle := TViewStyle(Items.Objects[ItemIndex]);

============================================
Patrick Dunford, Christchurch, NZ
http://patrick.dunford.com/
"These are they who have come out of the great tribulation;
they have washed their robes and made them white in the
blood of the Lamb" - Revelation 7:14

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to