Subject | Re: [IBO] TIB_Grid |
---|---|
Author | Ulrich |
Post date | 2003-12-26T11:30:55Z |
Hello James
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
> To place a button in one of your column in your ib_grid, go to thethen
> EditLinks property in your ib_grid(go see the object inspector),
> from there put the field name of your dataset which you want thebutton
> to appear. Then put some code for that button in theOnEditButtonClick
> event to open your own editor.where
>
> To move the focused cell in the grid use ... moveby(rawcol,
> direction:integer) method of the ib_grid. the rawcol is the column
> you want the focused to be ... Iam not sure with the direction butI
> always put 1 in it and it works fine with me.What I would like to do is, to have only a button instead of the data
>
> James
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