How is 'setCellData()' used?

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
carlwryker
Posts: 22
Joined: Sun Jun 12, 2016 8:03 am

How is 'setCellData()' used?

Post by carlwryker »

How is 'setCellData()' used? I tried using the following code, but the cell looks blank even after resizing the column. However, 'getCellData()' returns the correct data value. Also, 'setCellText()' displays correctly.

Code: Select all

 
int data= 100;
/* tablePtr is pointer, row is the row index, col is the column index */
tablePtr->setCellData( row, col, &data );
 
Code::Blocks
mingw
Windows 10 64-bit
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: How is 'setCellData()' used?

Post by CuteAlien »

Sorry, seems badly documented :-)
This is basically just to keep a custom pointer around for each cell in which the user can keep any user-data. It's not displayed, but so you can keep additional data for yourself in it.
If you want to display numbers then convert a number to a string and use that string with setCellText.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
carlwryker
Posts: 22
Joined: Sun Jun 12, 2016 8:03 am

Re: How is 'setCellData()' used?

Post by carlwryker »

Thank you!
Code::Blocks
mingw
Windows 10 64-bit
Post Reply