Menu

TTableItem Accessory On Click

2013-07-31
2013-08-20
  • sir_wally_lewis

    sir_wally_lewis - 2013-07-31

    Hi,

    Is there an event that can be surfaced that will execute when the TTableItem Accessory is clicked?

     
  • sir_wally_lewis

    sir_wally_lewis - 2013-07-31

    Also, can't seem to get my tableView.BAckgroundcolor to be anything other than white. At design time it is black, at run time it goes white.

     
  • Fenistil

    Fenistil - 2013-08-15

    Hi, have you got a solution to the first question?

     
  • GJB

    GJB - 2013-08-15

    I solved that by checking whether the TTableItem.Accesorystyle = tvcs... (can't remember off the top of my head)

     
  • Fenistil

    Fenistil - 2013-08-17

    Thx, but I think about if there could be any situation in an iOS app, when I want to the user select some rows and not click an an accessory?

     
  • GJB

    GJB - 2013-08-18

    Hi Fenistil,

    I could think of two ways

    1) use a part of the itemtext or itemdescription to determine whether clicking is allowed
    2) use a specific value for TagStr or TagInt to determine this

    Kind regards

     
  • Fenistil

    Fenistil - 2013-08-20

    I see, but in iOS it seems that I can click the accessory and click the tableitem separately. I found this thread about it.

     
  • Fenistil

    Fenistil - 2013-08-20

    I see now its deprecated :( Its seem that the only method is somehow get the clicked coordinates and check if it is the accessory's area or use a View in the table cell and use a UIButton as accessory.

    Thx

     
  • Diego

    Diego - 2013-08-20

    Since you can create objets in a tableview item in runtime... you can create a button and assign the event you want to that button.

    What I don´t like in v3.x.x is that if you use custom objets in a TableItem, you can´t see the ItemText or ItemDescription, so you have to manually create them as objets inside the table item.

    In previous version, you could have custom objets and "native" texts living as good neighbours :)

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.