1

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 the column with the bitmap it does the following:

  1. Column Space 'Moves' but the bitmap's position is not moving.
  2. Other text headers now occupy the same space as the bitmap.
  3. The original column space is now an empty space in the position i moved it to.
  4. 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?

Seki
  • 11,135
  • 7
  • 46
  • 70
TrewerT
  • 11
  • 1
  • It sounds like you are using Grid presentation, is that right? Are you using PFC? What is in the DataWindow control's `resize` event? – Hugh Brackett Mar 01 '11 at 14:29

2 Answers2

1

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.

Hugh Brackett
  • 2,706
  • 14
  • 21
0

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

Terry
  • 6,160
  • 17
  • 16
  • There's still the resizing problem. Setting the width expression to a constant fixes it, but it makes the column resize less than you dragged it to when you make it smaller (bigger is fine). The X expression also does this. Having both set makes the effect worse. – Hugh Brackett Mar 01 '11 at 17:42
  • Oh. Guess I should have read the entire message. However, setting the width expression to "Long (Describe ( "col_name.width"))" works fine for me: respositions when adjacent columns are resized, scales, etc... I guess if you see a constant width solving some issues, then you and I are looking for different objectives. – Terry Mar 01 '11 at 21:35
  • The main difficulty is that I want the picture to be in the lower right corner of the label. – Hugh Brackett Jul 23 '13 at 18:55