Complex Grid Field Styles or Exceptions
Gavin, you might also take a look at this library. I’ve not done anything with grids in the library, but you may be able to adapt it to use Michael’s code.
github.com/SpoMacGuy/css-for-omnis
> On Sep 11, 2017, at 9:31 AM, Michael Monschau <michael@brainydata.co.uk> wrote:
>
> Hi Gav,
>
> I demonstrate how to do this in my Notation session at EurOmnis, using a single line of code to change the foreground colour of a background text object in the grid.
>
> I am debating whether I should tell you now or make you come to my session 🙂
>
> Here is the line strait from my session
>
> Do iList.$sendall(iGridRef.$objs.Text.[iList.$line].$forecolor.$assign(pick(iList.Value,rgb(x,x,x),rgb(y,y,y),etc)))
>
> the bit [iList.$line] is the grid exception bit so each line gets the exception based on a value in the list
>
> Hope this helps
>
> Michael
>
>
>
>> On 6 Sep 2017, at 15:32, Gavin Foster <omnislist@dataweaver.com> wrote:
>>
>> Hi $all,
>>
>> Using Studio 6.03:
>>
>> In a headed list, a column can have a style() function that changes the colour of the text dependant on some field value.
>> This happens at redraw.
>>
>> In a complex grid, we have $exceptions which allow us to change the colour of an individual cell under program control. e.g.
>> Do lvGridRef.$objs.
>>
>> This is a pain to perform for each line in the list, each time the complex grid is redrawn.
>> Is there some way of doing this/applying a style() to a field in a complex grid?
>>
>> Rgds,
>> Gav
>> _____________________________________________________________
>> Manage your list subscriptions at lists.omnis-dev.com
>
> _____________________________________________________________
> Manage your list subscriptions at lists.omnis-dev.com
Scotte Meredith
SpoMacGuy@gmail.com
_____________________________________________________________
Manage your list subscriptions at lists.omnis-dev.com