Results 1 to 6 of 6

Thread: How to prevent section expand when user clicks on header

  1. #1
    Lianja MVP
    Join Date
    Feb 2012
    Location
    Berea, KY, USA
    Posts
    2,045

    How to prevent section expand when user clicks on header

    Scenario: I am using the newly available activate() (thanks!) which happens when a section is being made the .activesection. I have the section set to collapsable = .F. The reason being that I want sections to be expandable only under certain conditions, which I am testing in the Activate delegate.

    What happens: in runtime mode, the section expands when the header is clicked, regardless of what I've tried.
    1. issue nodefault, but of course that only works in classes, and the lianja objects are base classes -- VFP did, fwiw, allow nodefault to prevent the current action in base classes
    2. return .F. -- no reason this should have worked, but had to try
    3. issue lianja.get("sectionname").collapse() -- I figured it was too early for it to work.
    Question: is there a way to do this, or am in the land of ER?

    thanks,

    Hank

  2. #2
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    6,102
    There is an attribute in the section attributes dialog. "Collapsible" -- just uncheck it and you can lay a page out as sections without having the sections expand/collapse when clicking on the header.

    You can also check "Hide header" so that that the headers are only visible in development mode.

    This lets you lay a page out visually using sections (and gadgets) when developing your UI but make the "development stuff" hidden in runtime mode.

    Name:  Screen Shot 2013-06-02 at 9.36.10 AM.png
Views: 90
Size:  29.5 KB

    Name:  Screen Shot 2013-06-02 at 9.33.25 AM.png
Views: 74
Size:  17.0 KB
    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
    Lianja MVP
    Join Date
    Feb 2012
    Location
    Berea, KY, USA
    Posts
    2,045
    Oops: forgot to mention that I had unchecked Collapsable. Unchecking it does prevent a click from collapsing, but does not prevent a click from expanding. I can live with it expanding in this instance, but if I didn't have an alternative for 1 of the sections in particular, having it not able to be expanded would have prevented confusion.

    thanks,

    Hank

  4. #4
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    6,102
    "collapsable" unchecked is designed to make a section always visible on the page so the section should be expanded before checking this then it cannot be collapsed. That is by design.
    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
    Lianja MVP
    Join Date
    Feb 2012
    Location
    Berea, KY, USA
    Posts
    2,045
    Quote Originally Posted by barrymavin View Post
    "collapsable" unchecked is designed to make a section always visible on the page so the section should be expanded before checking this then it cannot be collapsed. That is by design.
    The issue isn't whether it can be collapsed: that works as I would expect, which appears to be as-designed.

    My question was how to prevent a section which is not expanded, from being expanded.

    thanks,

    Hank

  6. #6
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    6,102
    Oh I see. Currently "Collapsible" is ignored in that scenario.
    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

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