DC_XbpBrowse:MoveColumn

This forum is for eXpress++ general support.
Post Reply
Message
Author
User avatar
Tom
Posts: 1171
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

DC_XbpBrowse:MoveColumn

#1 Post by Tom »

Hi, Roger.

The method MoveColumn of DC_XbpBrowse works excellent - until Visual Styles and a theme like Aero (Win 7/Vista) is used. In that case, the column headers are painted wrong (upper image: before, lower image: after move):

BTW, the sample "Move Column" in XDemo/sample set 5 still uses an old function. This should use the method "MoveColumn" of DC_XbpBrowse.
Attachments
Move column with Windows 7
Move column with Windows 7
movecolumn.jpg (57.34 KiB) Viewed 13097 times
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: DC_XbpBrowse:MoveColumn

#2 Post by rdonnay »

Tom -

Can you help me out by giving me a sample program?

Roger
The eXpress train is coming - and it has more cars.

User avatar
Tom
Posts: 1171
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: DC_XbpBrowse:MoveColumn

#3 Post by Tom »

Hi, Roger.

Just run your "Move column"-sample with usevisualstyle := .T. on a Vista- or 7-machine with Aero-theme or similar.
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

User avatar
Tom
Posts: 1171
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: DC_XbpBrowse:MoveColumn

#4 Post by Tom »

Hi, Roger.

Did you find the time to check the sample?

A similar problem comes up if browse columns are hidden/shown using the HIDE clause (with visual styles). Seems that the header and footer presentation gets lost on this way. The leftmost columns in this dialog were hidden and shown again shortly afterwards. Heading and footer are repainted incorrectly.
Attachments
hiddencolumns.jpg
hiddencolumns.jpg (109.28 KiB) Viewed 13010 times
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: DC_XbpBrowse:MoveColumn

#5 Post by rdonnay »

Tom -

I have been overworked lately.
Hope to get settled down soon.
Today, I am trying to catch up on BB postings.

Roger
The eXpress train is coming - and it has more cars.

User avatar
Tom
Posts: 1171
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: DC_XbpBrowse:MoveColumn

#6 Post by Tom »

Hi, Roger.

It seems that AddColumn() and InsColumn() lose some column properties. I found out that I have to reassign "usevisualstyle" to a column header (dataarea seems to work) and the "drawmode" (if ownerdrawing is used with the browse). I believe this is not your mistake, but something inside Xbase++. If I remove a column created with DCBROWSE and add it again afterwards, it's still a DC_XbpColumn object.

"usevisualstyle" was set for the entire browse, the DrawMode was only set for several columns (dataareas).
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: DC_XbpBrowse:MoveColumn

#7 Post by rdonnay »

Tom -

Are you saying that you have found a workaround or do you still need help from me?

Roger
The eXpress train is coming - and it has more cars.

User avatar
Tom
Posts: 1171
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: DC_XbpBrowse:MoveColumn

#8 Post by Tom »

Hi, Roger.

If "usevisualstyle" is used and a theme is active, columns (column headers) added or moved lose these informations. In addition, the DrawMode of the dataareas gets lost. These iVars have to be set manually after a column is moved or added again. I do this as a workaround. This is not very satisfying, but it works.
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: DC_XbpBrowse:MoveColumn

#9 Post by rdonnay »

If you show me your workaround, I will add it to eXpress++ build 255.
The eXpress train is coming - and it has more cars.

Post Reply