Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[nebula-dev] [compositeTable]: taint whole cell-area with color (Andr? Dietisheim)

Hmmmm; Override setBackground() on the abstract row object to recursively go through its children and setBackground() to the same color?

Would that do what you want?

Regards,

Dave

----------------------------------------------------------------------

Message: 1
Date: Fri, 23 Feb 2007 09:51:48 +0100
From: Andr? Dietisheim <dietisheim@xxxxxxxxx>
Subject: [nebula-dev] [compositeTable]: taint whole cell-area with
        color
To: Nebula Dev <nebula-dev@xxxxxxxxxxx>
Message-ID: <1172220708.13694.20.camel@pmobilead>
Content-Type: text/plain; charset=UTF-8

Hi Dave

I'm currently stuck in a problem where I try to have background-color in
a cell. The current cell-layout does not stretch the control to use the
complete area reserved in the row composite. If you have buttons and
texts in a row, the row gehts the max height used by the buttons. texts
are currently positioned to the bottom of the row, leaving a space above
them. If I set background-color on those text it looks terribly ugly.
Stretching those text-controls does not help as the text top-aligned
inside the text-control and it looks as ugly as before.
I have 2 solutions I tried without success:

1.) gc.fillRectangle() of row-composite (getParent() and use its y +
height). I unfortunately never got the expected result. I did not take
the time to track the error.

2.) wrap texts in another composite that has a layout that streches the
text horizontally and center it vertically. I tracked the problems I
have here and I think they could be solved:
- arrive-event not triggered: TableRow appends a focusListener to the
controls parent (wrapping composite here instead of text). wrapping
composite does not trigger focus events -> override addFocusListener on
wrapping composite to attach focus-listener to text-control
- current column not evaluated correctly in TableRow -> check nested
controls
- arrow-up & arrow-down navigation not handled natively by composite ->
extend keyTraversed handling in InternalComposite (currently it only
handles nextRow- and previousRow- Navigation)

in general I think solution 2) is lot of changes but could allow nesting
any kind of container in table cells. On the other hand the
straight-forward approach 1) should be sufficient for now. I do have to
admit though that I do not understand yet why my gc-drawings get
tackled.

I'd appreciate a lot you opinion on this stuff!

Greetings
Andr��



------------------------------

_______________________________________________
nebula-dev mailing list
nebula-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/nebula-dev


End of nebula-dev Digest, Vol 11, Issue 17
******************************************

Back to the top