Navigation bar: how to set hilite of item to false?

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
simon.schvartzman
Posts: 641
Joined: Tue Jul 29, 2014 12:52 am
Location: Brazil

Navigation bar: how to set hilite of item to false?

Post by simon.schvartzman » Sat Jan 19, 2019 1:12 pm

Hi "helpers"...as I can see once an item of a Navigation Bar is selected it remains hilited (blue icon) until another one is clicked.

I would like it to behave differently in other words after performing whatever action is to be performed I would like to set its hilite property to false (black icon).

I have tried several alternatives with no success:

Code: Select all

set the hilite of item "CheckIn" of widget "ActionsBar" of card "Main" to false

Code: Select all

set the hilite of item 1 of widget "ActionsBar" of card "Main" to false

Code: Select all

set the hilite of widget "ActionsBar" of card "Main" to false
It has to be a way to do it, someone to the rescue?

Thanks
Simon
________________________________________
To ";" or not to ";" that is the question

Klaus
Posts: 13824
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Navigation bar: how to set hilite of item to false?

Post by Klaus » Sat Jan 19, 2019 1:50 pm

Hi Simon,

looks like this is not implemented, maybe you can get away with this trick somehow:

Code: Select all

...
set the hilitecolor of widget 1 to the forecolor of widget 1
...
?

Best

Klaus

simon.schvartzman
Posts: 641
Joined: Tue Jul 29, 2014 12:52 am
Location: Brazil

Re: Navigation bar: how to set hilite of item to false?

Post by simon.schvartzman » Sat Jan 19, 2019 4:58 pm

Hi Klaus, it does the trick, many thanks.

Regards
Simon
________________________________________
To ";" or not to ";" that is the question

bwmilby
Posts: 438
Joined: Wed Jun 07, 2017 5:37 am
Location: Henrico, VA
Contact:

Re: Navigation bar: how to set hilite of item to false?

Post by bwmilby » Sat Jan 19, 2019 10:38 pm

There is a PR to add this option:
https://github.com/livecode/livecode/pull/6404

You could always pull down the source for the widget and update it for your own use while waiting for it to get published.

The syntax will be:

Code: Select all

set the hilitedItem of widget to 0
Brian Milby

Script Tracker https://github.com/bwmilby/scriptTracker

simon.schvartzman
Posts: 641
Joined: Tue Jul 29, 2014 12:52 am
Location: Brazil

Re: Navigation bar: how to set hilite of item to false?

Post by simon.schvartzman » Sun Jan 20, 2019 2:48 am

Thanks Brian for letting me know about this.

Regards
Simon
________________________________________
To ";" or not to ";" that is the question

Klaus
Posts: 13824
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Navigation bar: how to set hilite of item to false?

Post by Klaus » Sun Jan 20, 2019 10:31 am

This is good news!

marksmithhfx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 931
Joined: Thu Nov 13, 2008 6:48 am
Location: London, UK

Re: Navigation bar: how to set hilite of item to false?

Post by marksmithhfx » Mon Sep 21, 2020 9:47 am

simon.schvartzman wrote:
Sat Jan 19, 2019 1:12 pm
I would like it to behave differently in other words after performing whatever action is to be performed I would like to set its hilite property to false (black icon).
I am not sure if this is what you were looking for but setting the hiliteditemname to "item name" highlights an item, and setting it to empty sets them all back to grey.

Code: Select all

      set the hiliteditemname of widget "Navigation Bar" to empty
Mark
macOS 12.6.5 (Monterey), Xcode 14.2, LC 10.0.0, iOS 15.6.1
Targets: Mac, iOS

simon.schvartzman
Posts: 641
Joined: Tue Jul 29, 2014 12:52 am
Location: Brazil

Re: Navigation bar: how to set hilite of item to false?

Post by simon.schvartzman » Mon Sep 21, 2020 11:57 am

Thanks Mark, I've already accomplish my goal using Brian's suggestion above.

But I'll try your approach next time I need it.

Best!
Simon
________________________________________
To ";" or not to ";" that is the question

Post Reply

Return to “Talking LiveCode”