Row & Column of ListBox.ActiveCell

  1. 7 months ago

    Andy B

    3 Nov 2019 Airdrie, AB, Canada

    Is there a way to determine the row and column of the ActiveCell?

  2. Emile S

    3 Nov 2019 Europe (France, Strasbourg)

    What for ?

  3. Andy B

    3 Nov 2019 Airdrie, AB, Canada


  4. Emile S

    3 Nov 2019 Europe (France, Strasbourg)

    So, you want to know what Row / Cell was clicked ?

    Read there ListBox :
    Determining which cell was double-clicked

    The Cell is Editable, you know the Row,Cell

    You want to save the Cell “live” ?

    Sorry, I just checked a project where I have an Editable Cell and I do nothing like that there. In CellGotFocus, I remove the FocusRing/ Set a Mask Value, but nothing related to what you ask.

    In the Debugger, you can watch the ActiveCell (a TextField) if you add a CellKeyDown Event and set a Breakpoint there. This May Help you…

    Someone ?

  5. Emile S

    4 Nov 2019 Europe (France, Strasbourg)

    In CellGotFocus:

      Dim Edit_Cell As TextEdit
      Dim My_Row, My_Col As Integer
      Edit_Cell = Me.ActiveCell
      My_Row = Row
      My_Col = column
      Edit_Cell.SelStart = Len(Edit_Cell.Text)
      Edit_Cell.SelText = "Row, Column: " + Str(My_Row) + "," + Str(My_Col) + "."

    This returns what you asked into the ActiveCell.

  6. Andy B

    5 Nov 2019 Airdrie, AB, Canada

    Thanks, Emile.

    That's similar to what I do now, but I was looking to see if it was available directly. I end up having to use a global property to save the current row and column so I can access it in other events. Seems I can't override the ActiveCell to add these properties either.

  7. Emile S

    5 Nov 2019 Europe (France, Strasbourg)

    Use a TextArea instead (search in the forum for that trick).

  8. Andy B

    6 Nov 2019 Airdrie, AB, Canada

    Does a TextArea have a Row and Column property?

  9. Emile S

    6 Nov 2019 Europe (France, Strasbourg)

    a. What for ?
    (of course; and even if it would not be the cas you can use System.MouseX and System.MouseY: System .)

    b. read the LR (RTFM)… ;)

  10. Andy B

    6 Nov 2019 Airdrie, AB, Canada

    I see. You're suggesting to create my own Row and Column using MouseX and MouseY. Ok.
    I've already said why.

  11. Emile S

    7 Nov 2019 Europe (France, Strasbourg)

    “No” and “I do not understand”.

    There are plenty Events that have X and Y, and some that do not have.

    If you put a TextField (in the Cell) where the user click for Edit, in the TextField, there are Events that told you X and Y.

    Make a Search in this Forum (yes not easy) for the specs.

    Editable Listbox are the search words I had in mind to made that search.

  12. Andy B

    7 Nov 2019 Airdrie, AB, Canada

    I guess you’re trying to help, Emile, but I really don’t understand what you’re saying.

or Sign Up to reply!