|
-
Mar 28th, 2000, 05:41 AM
#1
Thread Starter
Member
Hi,
I am creating an app that has a Windows Explorer-like interface, with a TreeView on the left side and a ListView on the right. My first dilemma is that when an item is selected in the TreeView, if another control (such as the ListView) gets the focus, the selected item in the TreeView dims (HideSelection is False). I want it to stay the highlight color, like it does in Windows Explorer. I'm guessing I have to use subclassing etc and somehow change the inactive color. I'm not good with this yet, so could somebody help me through it? I also have another issue with the ListView; is there any way to have the icons be dithered smoothly, like in Explorer, rather than the every-other-pixel way that is the default? This would greatly improve the interface. Thanks in advance for your help.
Best regards,
Mike Wellems
PowerQuery
-
Mar 29th, 2000, 07:33 AM
#2
Fanatic Member
HI Mike,
The treeview control has the SHOW SELECTED or is it the HIGHLIGHT SELECTED or is it the HIDE SELECTED i think its the latter and if it is then it should be de-selected and if its any of the former than they /it should be slected (by selected i mean checked as we are talking of a checkbox type of option)
DocZaf
{;->
-
Mar 29th, 2000, 12:31 PM
#3
Junior Member
Hi,
Just try out by setting the HIDE SELECTION Property to false
Thanx
Murali
-
Mar 29th, 2000, 10:32 PM
#4
New Member
Hi Mike:
I, too, have been trying to coerce the TreeView control to show the EXACT icon that I've assigned to it when selecting and then dragging it around. All I've been able to come up with is a series of Excedrin headaches, though.
I want the icons I use in the TreeView to be nice, small, clean-looking icons. To that end, I started assigning icons to an ImageList whose size had been set to 16x16. The icons appear nicely resized in the TreeView . . . until I drag one around. Then, to my horror, it reverts to using a 32x32 image based upon the resized 16x16 image; in other words, it appears to create its new icon at one and only one resolution.
Next, I tried creating icons that were only 16x16 to begin with. Those, too, look quite nice in the TreeView until I start to drag them, then I'm back to the darn 32x32 icons.
Thinking that the problem actually resided in the CreateDragImage method, I switched over to expressly referencing the icon I wanted directly from my ImageList. Nice try, but not even close, although this does use the original 32x32 icons if they are what were loaded in the ImageList in the first place.
Does ANYONE have any idea how to override this "helpful" default behavior? Or is this just one of those "gotta live with it" pains that seem to so thoroughly delight our C++-coding brethren?
Jon
-
Apr 4th, 2000, 01:36 AM
#5
Thread Starter
Member
HideSelection is already set to False. However, when the control loses the focus, the selected node still dims to a light grey color, instead of staying the selected color. If you look in Windows Explorer, when you select a folder in the folders pane, and then select a file from the files pane, the selected folder stays the highlighted color, not turning light grey. I'm trying to make my TreeView to act like the Windows Explorer treeview. Any ideas?
Thanks,
Mike Wellems
-
Apr 4th, 2000, 03:52 AM
#6
Fanatic Member
Use the Win Api call SetWindowProperty with the relavent parameters to set the property to whatever you want it to be
Doc Zaf
{;->
-
Apr 4th, 2000, 04:20 AM
#7
Thread Starter
Member
Is there any way to change the color of the nodes when the TreeView control does not have the focus and HideSelection is False? In this situation, the selected node is highlighted in grey, but if this color could be changes, it would solve my problem. I'm not sure that I understand how I could use SetWindowProperty to do this...
Thanks again,
Mike Wellems
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|