Results 1 to 9 of 9

Thread: Run code after column from table is dragged and dropped onto section

  1. #1
    Senior Member
    Join Date
    Apr 2012
    Location
    United Kingdom
    Posts
    657

    Run code after column from table is dragged and dropped onto section

    Is there any delegate that can be called after a column from table is dragged and dropped onto section?

    When I drag a column say chr(10) onto a canvas section it creates a textbox with the name say field5

    I want to be able to run some code that changes the name.

    So if the column was cfirstname I want to rename field5 to txt_cfirstname, if an memofield then edit_cfirsname.

    At present I need to click on the caption of the text box to open the attributes and change it before I do any coding.

    In the assistant, which is brilliant to use, I can't change the name by the looks of it.

    When coding using something like txt_firstname is easier than field5 as one know hat it being referred to.

    David

  2. #2
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    6,889
    Blog Entries
    18
    No there is no way of hooking into that type of development operation.

    You can change the name in the “attributes” which contains all of the available attributes but much slower than working in the “Assistant”.

    Also, See Lianja.getControlSource()
    https://www.lianja.com/doc/index.php/Lianja
    Last edited by barrymavin; 2022-07-31 at 10:19.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  3. #3
    Senior Member
    Join Date
    Apr 2012
    Location
    United Kingdom
    Posts
    657
    Thanks Barry

    Yes it would be MUCH quicker and far easier to be able to do it in the assistant, but in the assistant I can only copy the name there does not seem to be any way to change the name.

    The See Lianja.getElementByControlSource() looks VERY interesting
    Last edited by avianmanagement; 2022-07-31 at 10:19.

  4. #4
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    6,889
    Blog Entries
    18
    Quote Originally Posted by avianmanagement View Post
    Thanks Barry

    Yes it would be MUCH quicker and far easier to be able to do it in the assistant, but in the assistant I can only copy the name there does not seem to be any way to change the name.

    The See Lianja.getElementByControlSource() looks VERY interesting
    Lianja.getControlSource()
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  5. #5
    Senior Member
    Join Date
    Apr 2012
    Location
    United Kingdom
    Posts
    657
    Hi Barry

    I could only find Lianja.getElementByControlSource() in the documentation online.

    Is this something you might consider if I put and ER ticket in ?

  6. #6
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    6,889
    Blog Entries
    18
    Hi David

    it is in the doc. I corrected my post.

    Lianja.getControlSource()
    https://www.lianja.com/doc/index.php/Lianja

    Return a reference to the formitem bound to the specified controlsource.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  7. #7
    Senior Member
    Join Date
    Apr 2012
    Location
    United Kingdom
    Posts
    657
    Hi Barry,

    it is listed but for any examples it refers back to

    Working with the Lianja Object Model

    Lianja.getElementByControlsource()

    I assume as it says

    Note: The synonym Lianja.getControlSource(cSource) is also available.

    it is the same thing as

    Lianja.getElementByControlsource()


    David

  8. #8
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    6,889
    Blog Entries
    18
    Just use Lianja.GetControlSource()
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  9. #9
    Senior Member
    Join Date
    Apr 2012
    Location
    United Kingdom
    Posts
    657
    Thanks that looks really useful, quick and easy to use without having to rename things

    David

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Journey into the Cloud
Join us