omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    programmatically deselecting a tableview cell

    Pythonista
    2
    3
    2408
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • polymerchm
      polymerchm last edited by

      lots of iOS tricks for this. Can it be done in pythonista iu modules? And/or a deselect all?

      1 Reply Last reply Reply Quote 0
      • brumm
        brumm last edited by

        
        #select
        r = []
        t = tuple([0, i]) #i=line
        r.append(t)
        self.view['tableview1'].selected_rows = r
        
        #deselect
        self.view['tableview1'].selected_rows = []
        self.view['tableview1'].reload_data()
        
        
        1 Reply Last reply Reply Quote 0
        • polymerchm
          polymerchm last edited by

          Annoyingly obvious. Assumed selected_rows was read only. Thanks.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Powered by NodeBB Forums | Contributors