How can i detect a column-resize? |
Post Reply |
Author | |
Jebo
Senior Member Joined: 27 October 2005 Location: Germany Status: Offline Points: 318 |
Post Options
Thanks(0)
Posted: 26 September 2007 at 2:43pm |
Hi,
please, how can I recognize whether the user has resized a column with the resize-splitter?
I cannot detect any event that fires!?!
THX!
|
|
Jebo
Senior Member Joined: 27 October 2005 Location: Germany Status: Offline Points: 318 |
Post Options
Thanks(0)
|
Is there no way?
|
|
sserge
Moderator Group Joined: 01 December 2004 Status: Offline Points: 1297 |
Post Options
Thanks(0)
|
Well, for MFC version there is a special event, which unfortunately is not yet published for ActiveX: called COLUMN WIDTH CHANGED.
It could be available for the next version however. -- WBR, Serge |
|
Jebo
Senior Member Joined: 27 October 2005 Location: Germany Status: Offline Points: 318 |
Post Options
Thanks(0)
|
THX!
Do U know any workaround to detect a column-width-change by the user?
|
|
sserge
Moderator Group Joined: 01 December 2004 Status: Offline Points: 1297 |
Post Options
Thanks(0)
|
Try handling MouseDown event -- look for a regular sample application for an example. There you can detect whether a Column Header Area was clicked (this might be a resizing click).
-- WBR, Serge |
|
Jebo
Senior Member Joined: 27 October 2005 Location: Germany Status: Offline Points: 318 |
Post Options
Thanks(0)
|
Oh yesssssssss! That worX great! :-)
|
|
Jebo
Senior Member Joined: 27 October 2005 Location: Germany Status: Offline Points: 318 |
Post Options
Thanks(0)
|
Sorry, my last answer was too fast - and wrong! With the MouseDown-Event i can only detect the actually column-width, not the new column-width(!!!). And the MouseUp-Event does not fires if the user hast column-sizing finished! ;-(So i hope you can add the "COLUMN WIDTH CHANGED" Event to the next release! THANK YOU!!!
|
|
apuhjee
Senior Member Joined: 02 September 2005 Location: United States Status: Offline Points: 130 |
Post Options
Thanks(0)
|
Can we please get this event in the ActiveX version?
|
|
Baldur
Senior Member Joined: 22 November 2006 Location: Germany Status: Offline Points: 244 |
Post Options
Thanks(0)
|
I have maked a workaround with a timer.
In the ColumnsAdd i store the width in the tag and every 100 ms, i check if the actual width is changed to the stored width.
It's working nice and easy.
|
|
Jebo
Senior Member Joined: 27 October 2005 Location: Germany Status: Offline Points: 318 |
Post Options
Thanks(0)
|
@Baldur
Okay, but U've always a heavy timer (for a little Feature) in Ur App!
I check the columnwidth on "Lost Focus". But both is only a workaround - so I will hope that the Codejock-guys have a heart for us and put this event to the next release! ;-)
|
|
Baldur
Senior Member Joined: 22 November 2006 Location: Germany Status: Offline Points: 244 |
Post Options
Thanks(0)
|
I now use MouseDown and MouseUp-Event.
in MouseDown i store the active column (from hittest), in MouseUp i check for changed width's.
If no width is changed, i compare with the stored column, if the column is not changed, this is a single-column-click.
Heavy, but it works correct.
(I can't wait for the next version.)
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |