B4A Library [Class] Flexible Table

Discussion in 'Additional libraries, classes and official updates' started by melamoud, Jun 30, 2013.

  1. klaus

    klaus Expert Licensed User

    No, not possible.
     
  2. Frank.G

    Frank.G Member Licensed User

    Just for Info
    I can confirm, also had to edit the Table.bas @ cSingeline=False to get it to work.
    All other things I tried (the posted solutions in this thread) did not work.

    Maybe I did something wrong in how I coded my app, anyways it works now .

    Frank
     
  3. klaus

    klaus Expert Licensed User

    Can you post your code or bette a small project showing the problem.

    Moving
    HerTabel.RowHeight=100dip
    HerTabel.SingleLine=False

    before
    HerTabel.SetColumnsWidths(Array As Int(100dip,400dip))
    works, I tested it.
     
  4. Frank.G

    Frank.G Member Licensed User

    See attached ZIP file.
    The app will not compile correct as it is missing the File Purin.db what I don't attach beacause of copyright.
    It is an SQL File containing two columns "Name" and "Purin" in a Table called "Lebensmittel"

    Also the ZIP contains the modified Table.bas.
    The concerning table is on the second page and contains the data that is selected/copied via Long_click from an B4XTable row.

    Hope you can see what my spagetti code tries to do here :eek:

    Thanks for the help
    Frank
     

    Attached Files:

  5. klaus

    klaus Expert Licensed User

    I had a look at your project.
    Yes. HerTabel.SingleLine = False has no effect.
    HerTabel.RowHeight = 100dip works.
    The work when loading a database into the table, that's how I tested it.
    When rows are added in the code HerTabel.SingleLine = False has no effect.
    Attached your project with the new Table version 3.01 class.
    I left my test changes in the code.
     

    Attached Files:

    Erel and Frank.G like this.
  6. klaus

    klaus Expert Licensed User

    The Table class has been updated to Version 3.01 in the first post.
    Amended SingleLine property setting in the code.
     
    Peter Simpson and Frank.G like this.
  7. agraham

    agraham Expert Licensed User

    I'm looking for a simple Table view and this looks good. However when I run the demo I get an index out of bounds error in Table line 820 when I press Change Table.

    I haven't looked at the code closely enough to see why.
     
  8. klaus

    klaus Expert Licensed User

    The Table class has been updated to Version 3.02 in the first post.
    Amended the error above.
     
  9. Manaf Alajrad

    Manaf Alajrad New Member Licensed User

    Hey Klaus,
    First of all Thank you for this amazing table.
    I'm having a problem trying to set the SelectedRowColor in the CellClick Sub, when the cell is clicked the table disappear totally.

    sorry for bothering you with this, and many thanks.

    This is the code:

    Sub Table1_CellClick(col As Int, row As Int)
    Table1.SelectedRowColor = Colors.Red
    End Sub
     
  10. klaus

    klaus Expert Licensed User

    What exactly do you want to do and what do you expect?
    I suppose that you want to set the color of the row you are currently selecting, this will not work.
    The SelectedRowColor property sets the color of selected rows in general, you cannot set different colors for different selected rows.
    If you really want to set the color for the selected rows in general, set it before you fill the table.
     
    Manaf Alajrad likes this.
  11. Manaf Alajrad

    Manaf Alajrad New Member Licensed User


    thanks for answering, now I understand.

    what a really need now is to deactivate the SelectedRow, I need that the table does not change its color.

    Sorry for the rusty english that I have.
     
  12. klaus

    klaus Expert Licensed User

    Create a CellClick event and add Table1.clearSelection like below:

    Code:
    Sub Table1_CellClick(col As Int, row As Int)
        Table1.clearSelection
    End Sub
    Replace Table1 by your table name.
     
    Manaf Alajrad likes this.
  13. manuelsalazar

    manuelsalazar Member Licensed User

    hI :
    I am using the TableV1_44 routines.....
    How can I use it in a program that close any table when you click anywhere outside the table, I mean to use it as popup table in a consult.

    Thanks in advanced.
    Manuel
     
  14. klaus

    klaus Expert Licensed User

    You can put the Table on a full screen transparent Panel and use the Panel_Click event to set its Visible property.
     
  15. manuelsalazar

    manuelsalazar Member Licensed User

    There are 2 objects : Table1 , pnlTable
    You mean that I have to put in the designer of my screen form and set invisible , then change the status when needed ?
     
  16. manuelsalazar

    manuelsalazar Member Licensed User

    But I think to check activity_click event instead of panel_click.

    is correct?

    Thanks in advanced.
     
  17. klaus

    klaus Expert Licensed User

    It depends on how your layout is constructed.
    You can use the Click event of the Activity, this is implemented in the demo program but just commented.
    You can try this in the demo program.
    You can also eliminate pnlTable and add Table1 directly onto the Activity.

    The version 1.44 is a very old version, the latest version is 3.02, which is a CustomView and can be added in the Designer.

    Attached the V1_44 demo program without pnlTable.
     

    Attached Files:

    Last edited: Aug 21, 2019
    Erel likes this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice