Cascade button - items with 'text' formatting

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
jsburnett
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 121
Joined: Fri Mar 09, 2007 9:47 pm

Cascade button - items with 'text' formatting

Post by jsburnett » Tue Feb 14, 2017 6:12 pm

Hi,

I am looking for a reference to guide me in using text in cascade buttons.
I am trying to put dates into a cascade button and learned that the '/' causes the text to behavior differently.

I see a reference to adding check marks to the items in the cascade button using '!c"/

Is there anyway to display "2/14/2017"?

Are there other 'characters' like "!c" to that changes the format of your menu item?

Thank you for your patients for this 'begginer' question.

JB

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10330
Joined: Wed May 06, 2009 2:28 pm

Re: Cascade button - items with 'text' formatting

Post by dunbarx » Tue Feb 14, 2017 6:41 pm

There are two possible ways out of this:

1- Someone will know how to circumvent the tag structure of hierarchal menu buttons.

2- You can get a kluge from an old-timer, who likes kluges. Make a pulldown menu button named "p4". Make an ordinary button. In the script of the ordinary button:

Code: Select all

on mouseUp
   put space & numToChar(218) & space into ersatzSlash
   put "AA" & return & tab & "5" & ersatzSlash & "12" & ersatzSlash & 17 & return & "BB" & return & "CC" into btn "p4"
end mouseUp
The use of a "slash-like" character bypasses the tag constraints. So May 12, 2017 renders "correctly". You must then replace ersatzSlash with numToChar(47) when you extract and process that date doppleganger.

Craig Newman

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10052
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Cascade button - items with 'text' formatting

Post by FourthWorld » Tue Feb 14, 2017 6:51 pm

IIRC you can use "//" to render as "/" in a menu.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

jsburnett
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 121
Joined: Fri Mar 09, 2007 9:47 pm

Re: Cascade button - items with 'text' formatting

Post by jsburnett » Tue Feb 14, 2017 7:20 pm

Awesome, Thanks!!

JB

Post Reply