Hi Ian & Greg; as always you have been a tremendous help to me. I've asked fltk
questions in the past and you two always step up to help!
I won't be in front of the code again until Monday but I will try the advice
below first thing Monday and see where it leads.
Greg, it is indeed the 'cursor' concept of current_row that I am using in the
draw_cell's context routine that draws the current_row a different color than
all other rows. Our code looks quite similar, I can't see what we've really
done different - I will paste mine Monday if I am still stumped.
As for repeating-keys being disabled on some OS level, holding up/down arrow
key in (i.e.) Excel does have the expected repeating behavior.
I should mention I also am having the same trouble on
Fl_Browser/Fl_Hold_Browser. I am under the assumption -by what you guys have
said- is that the default behavior of Fl_Browser is when it has focus up/down
should understand repeating behavior? I've debugged extensively to make sure
no handlers are returning "1" and blocking this behavior to no avail.
I can't remember my exact fltk lib version I'm compiling with - but will
provide that Monday as well.
PS: Not sure why I wrote "Depressed" instead of "Pressed" everywhere in my
OP... must have been a sad day :)
>
> On 30 Mar 2012, at 18:42, Greg Ercolano wrote:
>
> > There is the concept of a 'cursor' in the form of
> > 'current_row' and 'current_col' variables, and this
> > cursor can be moved around with the arrow keys.
> >=20
> > Since the app handles all cell drawing, the app has to
> > handle drawing this cursor if it wants it to be visible.
> >=20
> > Thing is, I don't think any of our test programs show
> > how to do that; guess I'll add it to one of the examples,
> > or make a new one.
> >=20
> > Basically, in the app's draw_cell() callback, when
> > CELL_CONTEXT is received (which tells the app to draw a cell),
> > one can check to see if the row/col values of that cell match
> > the cursor's row/col values, and if so, draw the focus_box(), =
> eg:
> >=20
> > ---- snip
> >=20
> > // Handle drawing all cells in table
> > void MyTable::draw_cell(TableContext context, int R, int C, int X, int =
> Y, int W, int H) {
> > [..]
> > case CONTEXT_CELL: {
> >=20
> > [..cell drawing here..]
> >=20
> > if ( R =3D=3D current_row && C =3D=3D current_col ) // ADD =
> THIS
> > draw_focus(box(),X,Y,W,H); // ADD THIS
> >=20
> > fl_pop_clip();
> > return;
> > }
> >=20
> > ---- snip
> >=20
> > As a test, I just added that to the table-sort.cxx example
> > and it shows the little focus box when you use the arrow keys
> > to move around, and the table scrolls when the cursor moves
> > off an edge, etc.
> >=20
> > In the above case, it draws the focus box around just the cell,
> > but you can also draw it over the whole row if you want by
> > ignoring the current_col value, and using the entire width
> > of the screen instead of the X and W values.
>
> Cool - I'm not certain, but that sounds like it might be just what the =
> OP wanted, so hopefully this'll be enough info to get that sorted out =
> now!
>
> Cheers to one and all.
>
> Really lovely weather today here. Hope everyone has it as nice!
>
>
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk