[Gambas-user] Two colors and two entries in a GridView
Rolf-Werner Eilert
rwe-sse at ...3629...
Fri Aug 4 08:57:07 CEST 2017
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.
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...
2. Once upon a time, I used TextLabels created dynamically at runtime to
show calendar entries. This means, however, they are hovering above the
GridView, not alowing direct mouse-click access to the cell below. On my
calendar it doesn't matter, but it would screw up things unnecessarily
in my current project.
3. It is possible to add a picture to a cell, the picture being shown on
the left-hand side of the cell with the text at its right. Now, I
thought it might be possible to create a little Picture with the second
color and second entry virtually in the background and simply send it to
the cell. Do you think this is possible, and how?
This is what I came about:
- DrawingArea, Not Visible, Cached
- its size = cell height, but cell width / 2
- Background for the second entry
- Font as in the cell
- write text for the second entry
Then I would have to send this as a Picture to the GridView cell - but how?
Thank you for reading up to here and for any ideas!
Regards
Rolf
More information about the User
mailing list