locked
selecting line from multiline textbox RRS feed

  • Question

  • I want to click to display multi line text and recover when I click on selected item.
    Saturday, August 1, 2015 10:12 PM

Answers

  • (translated by Google translator)

    I suggest to use "LDControls.LastListBoxIndex" of component "ListBox" of LitDev extension instead of "MultiLineTextBox".

    Otherwise, you can know at what line you clicked using the coordinates of the mouse when it is pressed.

    • Proposed as answer by litdev Monday, August 3, 2015 6:54 PM
    • Marked as answer by litdev Friday, August 14, 2015 7:23 PM
    Sunday, August 2, 2015 10:03 AM
  • Hi deuce

    There are native SB solutions for this as well.

    I came up with an extensible routine: UpdateMultilineTextBox().

    It could be deemed a bit of a hack in that you forgo the copy & paste feature in the ML txtbox, however for a selection list that's not fatal. That feature can just be passed to another textbox that displays the selection.

    QMD177

    It works in the browser too but the browser doesn't support copy/past to the clipboard.


    • Edited by Jibba j Sunday, August 2, 2015 10:49 PM
    • Proposed as answer by litdev Monday, August 3, 2015 7:00 PM
    • Marked as answer by litdev Friday, August 14, 2015 7:23 PM
    Sunday, August 2, 2015 10:39 PM

All replies

  • (translated by Google translator)

    I suggest to use "LDControls.LastListBoxIndex" of component "ListBox" of LitDev extension instead of "MultiLineTextBox".

    Otherwise, you can know at what line you clicked using the coordinates of the mouse when it is pressed.

    • Proposed as answer by litdev Monday, August 3, 2015 6:54 PM
    • Marked as answer by litdev Friday, August 14, 2015 7:23 PM
    Sunday, August 2, 2015 10:03 AM
  • Hi deuce

    There are native SB solutions for this as well.

    I came up with an extensible routine: UpdateMultilineTextBox().

    It could be deemed a bit of a hack in that you forgo the copy & paste feature in the ML txtbox, however for a selection list that's not fatal. That feature can just be passed to another textbox that displays the selection.

    QMD177

    It works in the browser too but the browser doesn't support copy/past to the clipboard.


    • Edited by Jibba j Sunday, August 2, 2015 10:49 PM
    • Proposed as answer by litdev Monday, August 3, 2015 7:00 PM
    • Marked as answer by litdev Friday, August 14, 2015 7:23 PM
    Sunday, August 2, 2015 10:39 PM
  • Oh my... Litdev extension.  Who knew??  Many thanks!!   It is amazing that SB should have so much other functionality but after defining a multiline text box, gives no method of getting a line number clicked on.   Also amazing is the inablility to disable Intellisense
    Wednesday, August 5, 2015 12:35 AM
  • Thank you Jibba J.  But I am not sure I understand your response.  
    Wednesday, August 5, 2015 12:41 AM
  • Sorry deuce.

    By native I meant without using any extensions. BTW I think I've misused the word native there. I think it means something else.

    Basically the SB functions don't have a direct way to do your task without using extensions. But you can still code a solution without using extensions.

    By extensible I mean the code is setup so you can easily customise it to your needs.

    QMD177

    Wednesday, August 5, 2015 3:28 AM