Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Docking Pane
  New Posts New Posts RSS Feed - ShowPane without Activation
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

ShowPane without Activation

 Post Reply Post Reply
Author
Message
jemery View Drop Down
Groupie
Groupie


Joined: 09 January 2008
Status: Offline
Points: 12
Post Options Post Options   Thanks (0) Thanks(0)   Quote jemery Quote  Post ReplyReply Direct Link To This Post Topic: ShowPane without Activation
    Posted: 27 June 2008 at 1:42am
I have an application I'm working on where we have, say, a list of items you can scroll through and other windows display information about those items.

When the selectionChanged event is fired in the listView I want to bring the relevant data windows to that selection to the front of whatever set of windows it's in (basically make sure it's visible).

Unfortunately, the showPane function automatically takes focus away from the listView and setting back focus immediately doesn't seem to do anything (so far).

What I want to do is find an alternative (or a passable option parameter) for showPane that does -not- make the associated window active so that I can allow users to, say, scroll through the items.  I've tried other possibilities like setting them hidden and the like, but all roads so far lead back to having to use showPane, which I do not want to do.

Is there something I'm overlooking?
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 27 June 2008 at 2:24am
Hi,
 
Can you upload sample project?
 
 
 
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....
Back to Top
jemery View Drop Down
Groupie
Groupie


Joined: 09 January 2008
Status: Offline
Points: 12
Post Options Post Options   Thanks (0) Thanks(0)   Quote jemery Quote  Post ReplyReply Direct Link To This Post Posted: 27 June 2008 at 2:51am
Hmm.  I would have to create a new one from scratch as I can't give anything out (NDA).

I'd think it was a very simple issue if I can get it across.  When you use showPane it makes the pane you are bringing to the front the active form for the application (I presume it calls Activate() on it).  That's what I want to avoid.  I don't want the pane to become the active form but I still want to bring it to the front in the docking system.

We have lists of things in another pane that users want to be able to scroll through via the scroll wheel or arrow keys, but showPane steals the focus away whenever they select an item in the list.  Admittedly it's a nicety to be able to bring relevant panes about that item to the front, but that feature vastly speeds up their workflow and we don't want to lose it (it's useful enough that being unable to scroll through things is worth suffering through).

Here's a quick example straight from our app:

selectedIndexChanged event:

            Pane thisPane = DockingPaneManager.FindPane(WindowID.DOCKING_WINDOW_GROUP_VIEW);
            if ((!thisPane.Hidden) && (!thisPane.Closed))
            {
// This code makes the pane active, stealing focus from our current window and making our users unhappy :)              DockingPaneManager.ShowPane(WindowID.DOCKING_WINDOW_GROUP_VIEW);
            }

            // Setting focus back immediately does nothing as focus appears to be lost right after this code finishes execution, perhaps in another thread.
            this.ListView.Activate();

I've tried puzzling through other things like making it hidden/unhidden but all other commands also seem to automatically call Activate() on the pane being shown.  I can't seem to find anything to avoid that.
Back to Top
jemery View Drop Down
Groupie
Groupie


Joined: 09 January 2008
Status: Offline
Points: 12
Post Options Post Options   Thanks (0) Thanks(0)   Quote jemery Quote  Post ReplyReply Direct Link To This Post Posted: 27 June 2008 at 3:00am
I guess to be even more specific, imagine a list of items like:

Ball
Turtle
Yellow
Moon
Green

When you use the keys to go up and down through the list you might want to show a property pane tied to the height and age of an object if the item is an object.  If it's a color you might instead bring the color wheel to the front in order to see what the color looks like.

As it stands now I don't know how to do that as you would lose active control of the listBox whenever a pane is shown.  Meaning when you press up to reach 'Turtle' the property pane takes over control because it has showPane called on it.

This is really abstract but it seems like a simple example of why you wouldn't want to have showPane take away control.

Maybe 'showPaneSilently?'
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 27 June 2008 at 3:27am
Hi,
 
I'm glad you didn't try to create a sample because I could't open your project anyway, I have only VB6.0 installed. Maybe an option for you is to change your signature like I did so all members can see what version, platform and language you use. 
 
Try to set the focus to the pane (with listview in it).
 
In the DockingPane_Action event you can select the pane
 
Select Case Action
    Case PaneActionActivated
        DockingPane.Panes(ID of the pane with listview in it).Select
End Select
 
 
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.141 seconds.