Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    SectionStackSection: center title

    How come it's so darn difficult to center the title of a SectionStackSection??

    There are multiple old posts with different hints of manipulating CSS and we've tried several of these with no luck :/

    Surely someone most have an easy to use example of how this is done. Can't believe we're the only ones needing this ;)

    #2
    In answer to your opening question, maybe you shouldn't center it. Having the text far away from the open/close control looks odd, and wastes space that would be useful for sectionStackSection.controls. So very few people attempt it because it's generally worse.

    Comment


      #3
      We totally agree - when working with the "traditional" SectionStackSection with open/close controls and maybe some custom controls it would surely be hideous to start centering the title.

      However we tend to sometimes (mis)use the SectionStackSection as a nice and easy container for ListGrid's in a page. In these cases we of course set section.setCanCollapse(false) & section.setExpanded(true) thereby removing the open/close controls and yeah sure we'd then like to center the title in most cases ;)

      ...and looking around the forum it seems we are not the only ones :)
      We had hoped someone had come up with the answer and could post a small example code. Overriden some deeply hidden CSS setting is the kind of thing we're normally very happy to be abstracted from in smartGWT ;)

      Comment


        #4
        Just stop abusing the SectionStack and use a Label with centered text as your header. You are turning off everything that the SectionStack does anyway, it's less code to just use a Label in a VLayout.

        Comment


          #5
          Ha ha, ok - will do!!

          Think we got the idea from the GridTopHeaderSample ;)
          Last edited by chellegaard; 8 Feb 2015, 02:05.

          Comment

          Working...
          X