Navigation bar help

Discussion forum about all things Team Developer 5.x and 6.x
Headcold
United States of America
Posts: 25
Joined: 05 Mar 2018, 16:01
Location: USA

Navigation bar help

Post by Headcold » 22 Nov 2019, 16:28

I am curious how you open a new window when clicking on the different panes in a Navigation bar, since there is no actions under the panes themselves? I been playing around with it for a couple days and its starting to blow my mind.


Thanks

Pedro

Uwe van der Horst
Site Admin
Site Admin
Germany
Posts: 490
Joined: 05 Mar 2017, 14:21
Location: Wetter (Ruhr), Germany

Re: Navigation bar help

Post by Uwe van der Horst » 22 Nov 2019, 20:45

Hi Pedro,

in my app I have a Navigation Bar with different Panes. Each pane has a Tree Control as Pane Child.

When customer clicks a Pane I use On SAM_NavChange for the Navigation Bar:

On SAM_NavChange
...Set fct_nPane = SalNavGetActivePane( nbPane )
...If fct_nPane = PANE_X
......do something
...Else If fct_nPane = PANE_Y
......do something else

and so on.

When customer clicks a Pane Child (= Tree Control here) I use WM_LBUTTONDOWN for the action and WM_RBUTTONDOWN for the Context Menu.

This are constants:

Number: WM_LBUTTONDOWN = 0x0201
Number: WM_RBUTTONDOWN = 0x0204

On WM_LBUTTONDOWN
...Call GetCursorPos( fct_nX fct_nY )
...If SalTreeItemFromPoint( hWndItem, fct_nX fct_nY ) > 0
......Set fct_nItem = SalTreeGetSelectedItem( hWndItem )
......Set fct_nValue = SalTreeGetItemData( hWndItem, fct_nItem )
......If fct_nValue = x
.........Do something

GetCursorPos is an external function from library USER32.dll (WinApi).

HTH Uwe
Best regards,
Uwe van der Horst
Advo-web GmbH

Headcold
United States of America
Posts: 25
Joined: 05 Mar 2018, 16:01
Location: USA

Re: Navigation bar help

Post by Headcold » 25 Nov 2019, 12:47

Thanks for your help i figured it out.

Return to “General Discussion”

Who is online

Users browsing this forum: [Ccbot] and 0 guests