Skip to main content
Inspiring
December 16, 2018
Resuelto

ColorGrid Sample.

  • December 16, 2018
  • 1 respuesta
  • 1375 visualizaciones

Hi all

I work on the ColorGrid sample, and am interested in the UI component.

I can keep the colors chosen during the DrawEvent process, but I can't find the right list of selected colors during SmartRender. I find only the colors saved by default.

I must emphasize that I have tried several solutions but I block, maybe it is quite simple.

Can anyone tell me how to find the colors that are displayed in the component.

How to change the sample ColorGrid in order to save the new colors, and how to find a list of the colors displayed by the component during SmartRender process

Thank's

Este tema ha sido cerrado para respuestas.
Mejor respuesta de jmlm

errr... the process doesn't make much sense...

you get the value from the same CG_GRID_UI param in 2 ways. through

You are right and the explanation is very clear, I have a little everything tested.

the crashing line probably crahses becuase value.val.arbH might be NULL...

That's where the problem is, when I try to save data through SetStreamValue.

Referring to the ColorGrid sample I do not understand how to avoid the refreshment of colors.

The selected color is immediately replaced by the default color. After the DoClick process.

I know that this post has already been developed, but I can not find propper the solution.


value.val.arbH = infoH;

did the job

Shachar thanks for your support.

Merry Christmas and happy new year 2019 to all

JIM

1 respuesta

Community Expert
December 17, 2018

are you properly checking out CG_GRID_UI during pre-render before doing to

in smart render?

you can also use AEGP_GetNewStreamValue() instead.

either way, the ColorGrid sample stores it's data in an arb param which

should be synchronized between the UI and render threads.

jmlmAutor
Inspiring
December 18, 2018

Hello Shachar,

thanks for responding,

are you properly checking out CG_GRID_UI during pre-render before doing to

in smart render?

- Yes

you can also use AEGP_GetNewStreamValue() instead.

- I have not seen this solution yet.

Cheers Jim

jmlmAutor
Inspiring
December 18, 2018

In fact, I do not know how keep, and save the color changes, during the DoClick process.

Handle the new color during DrawEvent process, doesn't change anything, using AEGP_GetNewStreamValue() I get  the default initial value.