Dynamically changing TwwRecordViewItem properties in TwwRecordViewPanel

Comments

1 comment

  • Roy Woll

    Sorry, I don't think we ever answered this question.  The recordviewpanel has its controls created so if you are just changing the item's property it would not have any effect.  I would think calling RefreshControls(true) should recreate the controls, but you say you are getting an access violation. I would need more info on how to reproduce your error with RefreshControls to follow up.  

    If you really need access to the label associated with the control, you can use a cheating cast to gain access to the label.

    type THackRecordViewItem = class(TwwRecordViewItem);
    procedure TRecordViewDemoForm.infoButtonClick(Sender: TObject);
    begin
    THackRecordViewItem(wwrecordviewpanel1.items['Customer No']).LabelControl.text:= 'abc';

    end;

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk