Page 1 of 1

Navigation Widget

Posted: Tue Jan 26, 2016 2:13 pm
by Daveinthebigcity
I've started using the widgets as they look much nicer in my apps than using the standard buttons. I'm struggling with passing data between cards though.
I want a navigation widget that appears at the top of all of my cards, but when I click on an icon, it doesn't highlight the same button on the next card.
For example if my first card showed a navigation bar that gave:

Option 1 | Option 2| Option 3

If I clicked on Option 2 I would want the next card to show:

Option1 | Option 2 | Option 3

I've tried selecteditem and navHiliteColor but i'm not having any joy.

Thanks

Re: Navigation Widget

Posted: Tue Jan 26, 2016 2:21 pm
by bn
Dave,

try "navigate"

Code: Select all

on navigate pLabel
   go card pLabel
end navigate
open dictionary (in DP13) make it roughly 20 pixel wider manually (a bug) then select from the left popUp menu "navigation bar". There all messages and commands of the navbar widget are listed.

Kind regards
Bernd

Re: Navigation Widget

Posted: Tue Jan 26, 2016 2:23 pm
by Daveinthebigcity
Hi,
Thanks for the quick reply. I'm using navigate already. I can move between the cards using the menu fine but the highlight doesn't follow onto the next card.

Re: Navigation Widget

Posted: Tue Jan 26, 2016 2:29 pm
by bn
Dave,

I had to group the navbar and set the backgroundBehavior to true in the Properties Inspector. Then when you create a new card it is automaically placed on every new card. For existing cards you have to "place" (-> dictionary) the group.

The script "on navigate" is in the group script.

Kind regards
Bernd

Re: Navigation Widget

Posted: Tue Jan 26, 2016 2:30 pm
by Daveinthebigcity
Thanks,
I will give that a try.
Regards
Dave