Page 1 of 1
Icon in Datagrid
Posted: Fri Nov 28, 2014 5:31 pm
by matgarage
Hi all,
I've followed the app academy lesson about integrate button with icon in datagrid cell.
But when I refresh the datagrid, the background of the cell with icon (button) is not opaque and I see the background of the card insteed of the line of the datagrid.
I can't find where is my mistake.
An idea ?
Re: Icon in Datagrid
Posted: Fri Nov 28, 2014 8:15 pm
by Klaus
Hi Mat,
"clairvoyance" is actually on the TODO list, but we are not yet there
How do you fill your datagrid woth icon(s)?
Please post the code!
Best
Klaus
Re: Icon in Datagrid
Posted: Sat Nov 29, 2014 11:58 am
by matgarage

Sorry
I get a list, tab delimited items, that are : Name of the product TAB Quantity tab Side code (0 for 1 side, 1 for 2 side)
I populate a datagrid with 4 columns where column 1 get a behavior for indexing list.
I've set the row template like in the lesson of App Academy (edit group column 4 then put a blank button...) import icons, set the column 4 behavior with :
FillInData
Code: Select all
set the icon of button "brovo" of me to (pData & ".png")
LayoutControl
Code: Select all
set the rect of button "brovo" of me to pControlRect
resetData
Code: Select all
set the icon of button "brovo" of me to empty
BUT
This morning, for some reasons that I can't understand, the displaying of icons is correct.
I think about a persistant memory setting of the datagrid (I don't even know if this kind of things exists!)
So thank you ... and go ahead in your spiritual enhancement project

Re: Icon in Datagrid
Posted: Sat Nov 29, 2014 1:07 pm
by Klaus
Hi Mat,
glad you got it working!
There are GREMLINS sometimes, I'm telling you!
Best
Klaus
Re: Icon in Datagrid
Posted: Sun Nov 30, 2014 4:29 pm
by Traxgeek
Hi matgarage,
Just for information, Datagrids are powerful but often strangely behaved beasts. A datagrid, in my experience, will often start 'playing up' / not behave in the way it did (or the way you think it should) after breaking into and fixing / modifying the behaviour script.
In 99% of cases, saving your work, exiting LiveCode, re-starting Livecode and re-loading your project will fix your issue with Datagrids...
Just my half cents worth...
HTH
Trax