hiding 1st column of table field

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

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4036
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Re: hiding 1st column of table field

Post by bn » Wed Dec 07, 2022 9:57 pm

stam wrote:
Wed Dec 07, 2022 9:54 pm
Thanks for the insight Bernd - it seemed to work exactly as planned as it was, but I hear your warning - and will keep in mind for the future...
Stack above updated with your correct code.
It worked until you entered "12" into the field. It would hide columnn 1 and 2 without wholematches.

Kind regards
Bernd

jiml
Posts: 336
Joined: Sat Dec 09, 2006 1:27 am
Location: Los Angeles

Re: hiding 1st column of table field

Post by jiml » Wed Dec 07, 2022 11:38 pm

Jim, in your initMe handler add a line

set the leftMargin of me to 7

which approximates the default for table fields and was the spacing I was looking for. Now try hiding various columns. Column 1 is the only 1 that won't be fully hidden
Setting the padding could help with that. Try:

Code: Select all

go url "https://netrin.on-rev.com/misc/HideAnyColumn_V3.livecode"

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

Re: hiding 1st column of table field

Post by marksmithhfx » Thu Dec 08, 2022 4:31 pm

jiml wrote:
Wed Dec 07, 2022 11:38 pm
Setting the padding could help with that. Try:

Code: Select all

go url "https://netrin.on-rev.com/misc/HideAnyColumn_V3.livecode"
Hi Jim,

That's much better. I would say you have officially found a workaround that requires only modifying column margins and cell padding on the table. Well done!! (It's not exactly the same as an unmodified table, but some may find it even more aesthetically pleasing so you can't argue with that).

Cheers,
Mark
macOS 12.6.5 (Monterey), Xcode 14.2, LC 10.0.0, iOS 15.6.1
Targets: Mac, iOS

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”