Why does Bitmap in Column Header not update it's x position when column is moved? PowerBuilder 10.5
I have a DataWindow that has a number of columns. One of the columns have a bitmap as as a header instead of text. I can move each of the other columns by dragging and dropping to change the column order but I when I try to move t开发者_如何学Pythonhe column with the bitmap it does the following:
- Column Space 'Moves' but the bitmap's position is not moving.
- Other text headers now occupy the same space as the bitmap.
- The original column space is now an empty space in the position i moved it to.
- If i try to resize the column by dragging the edges, the bitmap scales up/down but it just does not move.
I've tried checking the 'moveable' checkbox but it does not help the bitmap move when I move the column. Is there any other property I need to check to get the bitmap to move along with the column?
The Grid DataWindow's magic only works well on the text objects in the header. However, you can stack more than one text in a header column and set the backgrounds on the upper ones transparent so they all show. The DataWindow will move and resize all of them together. If what you're after is some kind of indicator, you may be able to find what you want in a font. If you only need a monochrome bitmap you coud also make a font that had your bitmap in it.
FWIW, I'm seeing the same behaviour in 11.1, and I'd call it a bug. I'd tell you how to report it to Sybase (Case-Express if you haven't got a contract, better response if you have a contract), because they can't fix it if they don't know about it (it wouldn't be something I'd think to test either), but 10.5 is end of life, so there won't be any patches for it anyway.
The work around is to put an expression in the X attribute of the picture, something like "Long (Describe ("col_name.x"))
" (without the outer quotes). This solves the problem at run time, although my testing on 11.1 shows it looking a little funky in the designer, which really shouldn't matter.
Good luck,
Terry
精彩评论