Subject Re: [IBO] TIB_Grid
Author Ulrich
Hello James

> To place a button in one of your column in your ib_grid, go to the
> EditLinks property in your ib_grid(go see the object inspector),
then
> from there put the field name of your dataset which you want the
button
> to appear. Then put some code for that button in the
OnEditButtonClick
> event to open your own editor.
>
> To move the focused cell in the grid use ... moveby(rawcol,
> direction:integer) method of the ib_grid. the rawcol is the column
where
> you want the focused to be ... Iam not sure with the direction but
I
> always put 1 in it and it works fine with me.
>
> James

What I would like to do is, to have only a button instead of the data
col, cause in my case I try to manage an integer field bitwise. Cause
its not possible to show the value bitwise inside a TIB_Grid cell (if
anybody has done something similar, please let me know), I would like
to cover the col with a button. The button is for opening the editor
(my editor for bit manipulation). Actually I use the onClickCell
event to open my editor. I thought about to show the bit-states with
a graphic in the onCellPaint event, but actually I don't have time to
make it nice.

I didn't mean to move the focused cell, but to calculate the position
of this cell (in Pixels on the form) to move my editor near the
focused cell. the Problem is, that in the onCellGainFocus event there
is only the col-number, but with different col widths, I don't know
how to calculate the x-position in pixels. For the y-position it's
easier cause I calculate it with (y * defaultRowHeights)

Any ideas?

Best - Ulrich