Jump to content
Sign in to follow this  

D4P TStringGrid setting cell values

Recommended Posts

I'am using a stringgrid but how can I set the value of a cell. In Delphi it is the property Cells[column, row], but this is in python not accepted. It renders a AttributeError: Error in getting property "Cells".

What is the right way for setting a cellvalue?




Share this post

Link to post
  • Some components have DelphiVCL4Python-specific implementations to access their attributes. For example, to set header text for our first column here, using the SetCells() method as StringGrid.SetCells(0,0,"To-Do") is the Python equivalent of the Delphi Object Pascal StringGrid.Cells[0,0]:= Str("To-Do"); and the C++ StringGrid->Cells[0][0] = Str("To-Do");

introduction to pyscripter the best free python ide

Share this post

Link to post

Thank you for the fast response. Is there somewhere documentation of this DelphiVCL4Python-specific implementations?

Share this post

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this