Solved

Missing event for TreeView...Need suggestions!

Posted on 2000-03-08
6
156 Views
Last Modified: 2010-05-02
I need an event when resizing columns in the TreeView control. Suggestions?
0
Comment
Question by:Olli083097
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 2

Expert Comment

by:p_biggelaar
ID: 2596316
<resizing columns in the treeview control>

Are you sure you're talking about resizing columns in a treeview? Don't you mean:
A) resizing the treeview
-or-
B) resizing columns in the listview
0
 
LVL 2

Expert Comment

by:p_biggelaar
ID: 2596420
Oh, and..

A) not an option (there is no way for a user to resize the treeview)

B) the listview hasn't got events to tell you that a resize happened, or that it's going on. If you really, really need to know this there's a nasty way of determining it by for instance using a timer with a short interval that checks the columnheaders width property or something like that. But you should be really desperate of getting that info (your life or job is at stake or something like that) before you should even consider that as an option.
0
 
LVL 6

Expert Comment

by:andyclap
ID: 2598621
You could hook the message WM_NOTIFY, and look for a code of HDN_ENDTRACK in the NMHDR structure.
Just guessing here, check out what messages are being sent using spy.
0
Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

 
LVL 14

Accepted Solution

by:
wsh2 earned 100 total points
ID: 2599126
Yes.. andyclap is correct.. this definitely can be done through subclassing the Listview header. Check this out.. you will find MANY Listview API solutions with code.. in the Common Controls / Listview section.

http://www.mvps.org/vbnet/

Once there, keep an eye out for the one entitled.. "Subclassing and Responding to Notifications from the ListView Header".. in as you will find your solution there.. <smile>.

0
 

Author Comment

by:Olli083097
ID: 2599644
All:
I'm sorry, I really meant ListView(I wrote the question after a long day's work...).

wsh2:
Thanx! Exactly what I needed!!! Thanx!

BTW: I liked the page, "VBnet"
0
 

Author Comment

by:Olli083097
ID: 2599647
ARG! Forgot to accept your answer... Thanx, again!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question