Table1.enabled = false

I am trying to disable a table (latest Xojo version) so that the user cannot select an item but the table is always active. It makes no difference if I disable it in the IDE or in code in the open event or via a timer Table1.enabled = false. I tried the Simple Example from the Examples folder same response

What am I missing?

I don’t see an Enabled property for iOSMobileTable. I just set the Visible to false and hide the whole table or let a user select something and get a PopUpMessage saying why it’s not currently allowed.

Why don’t you see Table1.enabled?


Uploading: Screen Shot 2022-02-10 at 11.34.54 am.png…

Using iOSDesignExtensions there are many things you can do:

  • Disable selection of cells:
MobiletableCellData.setSelectionStyleXC(TableExtensionsXC.selectionStyle.none)
  • Disable bounce when scrolling:
Table.SetBouncesXC(False)
  • Disable scrolling:
Table.SetScrollEnabledXC(False)
1 Like

Thanks Jeremie for the suggestions but no one has explained why setting enabled = false doesn’t work?? I’m also trying to steer clear of iOSDesignExtensions to be compatible with Android when it comes assuming iOSDesignExtensions won’t work.

Concerning iOSdesignExtensions, I use it in all my iOS apps, maintain it and update it regularly.

I have no fear about it not being compatible with Android because I already know that I will update it as soon as Android target ships in Xojo.

I see the transition to Android to be done in two steps:

  1. Make sure that iOSdesignExtensions methods compile for Android, even if they have no effect
  2. Update all iOSdesignExtensions methods to have the features available for both iOS AND Android.

iOSdesignExtensions is free, open sourced and easy to use. If you decide not to benefit from it, it’s up to you.

3 Likes

A table is just a container that rearranges a set of views (table cells) displayed within it.
Disabling the table is useless because the user is not interacting with the table itself (apart from scrolling) but actually interacting with the cells.

1 Like

Awesome Jeremie, I should have asked earlier :slight_smile:

When I looked at the on-line docs for iOSMobileTable there was no Enabled property listed.

1 Like

Hi @Jeremie_L I noticed in IOSDesignExtensions you can’t apply the round button edges in IOS14+ is there another way to do this?

Screen Shot 2022-02-26 at 2.25.35 pm

Me.SetBackgroundColorXC(&c94219200)

Me.TintColor = &cFFFFFF
Me.CaptionColor = &cFFFFFF00
Dim insets As ExtensionsXC.xcUIEdgeInsets
insets.Left = 0
insets.Top = 0
insets.Bottom = 0
'insets.Right = 20
Me.SetButtonInsetsXC(insets)
'me.SetCornerRadiusXC(8)
'Me.SetImageXC(remove64)