Fill DataGrid (Form) with graphics

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
ace16vitamine
Posts: 130
Joined: Fri Apr 13, 2018 1:53 pm

Fill DataGrid (Form) with graphics

Post by ace16vitamine » Wed Jan 30, 2019 10:54 pm

Hi,

I created a Data Grid with some informations. This informations are loaded with FillInData without any problems.

Know I startet to create a graphic (oval dot) in the DataGrid Template. This is also working, I see this in each row. The informations are stored in pDataArray["status"] and I see them also. It is also possible to add the informations to a text field in each row without any problem.

But... in the case that I start a condition in FillInData it is not working, sometimes I see the dot, sometimes not. But why? The pDataArray["status"] is correct in each row, I have really no Idea.

Code: Select all

   
   if pDataArray["status"] is empty then
      set the visible of graphic "status_oval" to true
   else
      set the visible of graphic "status_oval" to false
   end if
   
   
I have the same issue if I set a color to the oval dot.

Thanks
Stefan

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

Re: Fill DataGrid (Form) with graphics

Post by Klaus » Wed Jan 30, 2019 11:22 pm

Hi Stefan,

OF ME is the magic word!
And Mr. Boole is our friend:

Code: Select all

... 
set the visible of graphic "status_oval" OF ME to (pDataArray["status"] = EMPTY)
 ...
:D


Best

Klaus

ace16vitamine
Posts: 130
Joined: Fri Apr 13, 2018 1:53 pm

Re: Fill DataGrid (Form) with graphics

Post by ace16vitamine » Thu Jan 31, 2019 12:10 am

Ha Ha Ha... Thank you Klaus! I already found my mistake some minutes before you wrote.

Stefan

Post Reply