Icon in Datagrid

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
matgarage
Posts: 73
Joined: Sat Apr 20, 2013 11:39 am

Icon in Datagrid

Post by matgarage » Fri Nov 28, 2014 5:31 pm

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 ?

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Icon in Datagrid

Post by Klaus » Fri Nov 28, 2014 8:15 pm

Hi Mat,

"clairvoyance" is actually on the TODO list, but we are not yet there 8)
How do you fill your datagrid woth icon(s)?
Please post the code!


Best

Klaus

matgarage
Posts: 73
Joined: Sat Apr 20, 2013 11:39 am

Re: Icon in Datagrid

Post by matgarage » Sat Nov 29, 2014 11:58 am

:D 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!) :roll:

So thank you ... and go ahead in your spiritual enhancement project :wink:
Last edited by matgarage on Sat Nov 29, 2014 4:12 pm, edited 1 time in total.

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Icon in Datagrid

Post by Klaus » Sat Nov 29, 2014 1:07 pm

Hi Mat,

glad you got it working!
There are GREMLINS sometimes, I'm telling you! :D


Best

Klaus

Traxgeek
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 281
Joined: Wed Jan 09, 2013 10:11 am

Re: Icon in Datagrid

Post by Traxgeek » Sun Nov 30, 2014 4:29 pm

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
I'm 'getting there'... just far too slowly !
Mac (Siera) and PC (Win7)
LiveCode 8.1.2 / 7.1.1

Post Reply