|
From: Scott D'V. <sdv...@sg...> - 2017-01-24 12:51:21
|
Greetings--
Item 1)
I'm experiencing a rendering problem when subclassing FXTableItem to
place Buttons and/or Checkboxes into an FXTable. If I have more cells
than will fit in a window (e.g. 10 rows in a window big enough for only
7) and I scroll with the scroll bar, some of the the button/check cells
get overlapped and out of alignment with the rest of their rows. I
apologize I'm unable to post a screenshot of what I'm referring, but It
seems only a subset of the cells get a call to the drawContent() method.
If I have a larger table with ~100 rows with each button numbered, I see
buttons labeled as 0,1,several obscured, 8,22,27,37,78,79,then 87-100
rendered properly, but not aligned with the columns.
Similarly, if my button cells are in the last column, and I scroll
horizontally left to obscure part of a rendered button table item, the
table item gets snapped to the edge of the table and overlaps the
adjacent text columns. If I scroll to the right, clipping seems to be
applied correctly.
I'm creating a ButtonTableItem by passing in an FXButton as follows:
ButtonTableItem::ButtonTableItem(FXButton *obj, void *userData):
FXTableItem(FXString:null, 0, userData), button(obj) {
//In the constructor, I save off my button's target and ID and remap
them to the table item's
//so I can rethrow button's SEL_COMMAND event as if it came from the
derived TableItem instead of the FXButton
}
I'm overriding the drawContent(const FXtable *table, FXDC &dc, FXint
x...) method and simply calling
button->position(x,y,w,h) to render it.
In drawContent(), I added some debug output to print the x,y,w,h, as
well as the dc's clipV/Y/Height/Width. I'm not entirely sure how I might
utilize the other data available to me (e.g. drawing context's clip
properties); However, It seems that when I grab the scroll bar and
scroll the image, only a few of the cells actually get a call to
drawContent, and the cells that haven't been clipped seem to stay in
place, while clipped cells seem to snap to the bottom or top, without
regard for the row's actual offsets
Item 2)
We are currently using Fox 1.6.51, though a migration to 1.7.x is
planned at some point. There have been many bugfixes to the 1.7.x
codebase; What migration concerns will we have migrating from 1.6 to
1.7? Obviously this depends on the classes and methods we are using in
1.6, but is 1.7 expected to be a drop in replacement for 1.6?
Item 3)
Do you have a suggestion for adding tooltips to an FXTable, either on a
cell-by-cell basis, or perhaps just the row/column headers? We've been
able to add context menus, and override double click handlers in some of
our table implementations, but I'm not exactly sure where to start
regarding tooltips.
Thank You in advance for continuing to support this toolkit!
--
Scott D'Vileskis
|