[Gambas-user] Two colors and two entries in a GridView

Rolf-Werner Eilert rwe-sse at ...3629...
Fri Aug 4 10:04:35 CEST 2017


Am 04.08.2017 09:16, schrieb Tobias Boege:
> On Fri, 04 Aug 2017, Rolf-Werner Eilert wrote:
>> In a GridView, it occurs that I need two different entries with two
>> different background colors in a few of the cells. So I thought about
>> different solutions for this.
>>
>
> You mean two different colors in the same cell and that's why you can't use
> the Background property of the cell?

Yes, that is what I meant.

>
>> 1. Using RichText doesn't produce any entries here on my system, don't know
>> why, but it might have been an easy way to use it with a <table> with two
>> columns. But even .Data.RichText = "Hello" doesn't show anything in the
>> cell...
>>
>
> GridView.Data is only to be used to provide data to the GridView inside its
> Data event (see the documentation). To access a particular cell use
>
>    GridView[Row, Column].RichText = ...

Well, I did put it into the Data event, and using .Data.Text = "hello" 
runs. Using RichText does not.

Do you remember the thread I started some two weeks ago, when I found 
that RichText showed pure text but would show nothing if I used 
<center></center>? That was on my laptop, newer system, now I am on my 
office system, maybe that is why. (Gambas is the same, 3.9.2)

Anyway, I have made so many bad experiences with RichText in the 
GridView that I thought about other ways of implementing this.

Regards
Rolf





More information about the User mailing list