Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: Toolbar Question

  1. #1

    Toolbar Question

    RobertJacobs post earlier got me thinking about toolbars.

    When I add a toolbar to a container with a vertical layout and assign the toolbar a value of 1, it docks itself nicely on the left side of my container.


    When changeing the layout to Horizontal and setting the orientation to 0, I thought I would get a toolbar docked at top of the container. Instead the toolbar is centered in the middle of the container.

    What is the best way to get the toolbar to be docked on the top part of the contianer?

    Thanks.

    Herb

  2. #2
    Lianja Team yvonne.milne's Avatar
    Join Date
    Feb 2012
    Location
    Berkshire, UK
    Posts
    1,843
    Does the toolbar not dock to the top when you add other controls to the container?

  3. #3
    Hi Yvonne,

    Yes - it does dock as soon as I add another control. Works on top and bottom. Very Excellent.
    Sorry to jump the gun on that one.

    Herb

  4. #4
    Hi Yvonne,

    I am trying to get a menu working in a tool bar in a customer gadget.But I am not getting the expected results. Could you put together a snippet of code that shows the correct way to build that - or point me in the right direction of an already existing example.

    gadget1.addobject("west", "container")
    west.layout ="vertical"
    west.margin = 5
    west.spacer =5
    west.backcolor =rgb(60,70,80)

    west.addobject("cnttool","container")
    cnttool.fixedheight =30
    cnttool.backcolor ="lightblue"
    cnttool.layout ="horizontal"
    cnttool.addobject("topbar","toolbar")
    topbar.addobject("topmenu","menu")
    topmenu.addobject("one","menuitem")
    one.caption ="one"
    topmenu.addobject("two","menuitem")
    two.caption ="two"
    Thanks.

    Herb

  5. #5
    Lianja Team yvonne.milne's Avatar
    Join Date
    Feb 2012
    Location
    Berkshire, UK
    Posts
    1,843
    Hi Herb,

    Sorry, missed this one. Can you give me more details on what's not happening that you are expecting to happen?

    Thanks,

    Yvonne

  6. #6
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,185
    Blog Entries
    22
    Hi Herb, You can't add menus to containers. They are specific to forms. If you want menus in sections you can specify them as a header menu or a footer menu.

    Similarly toolbars are specific to forms/dialogs.

    On the mac for example, menus are not in the form/window they appear along the top of the screen.
    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
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,185
    Blog Entries
    22
    Thinking about this again. They should work. In fact they can be Floatable and Moveable too (properties).
    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

  8. #8
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,185
    Blog Entries
    22
    You may want to look at "Toolbox" too.

    Its like a "Pageframe" and you add "Page" objects. Floats on the top of the app with tabbed selection panels.
    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
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,185
    Blog Entries
    22
    Hi Herb,

    You add actions (icons) to a "Toolbar" like this:

    Code:
    oToolbar = createObject("Toolbar")
    oToolbar.addAction("app:/icon1.png", "label1")
    oToolbar.addAction("app:/icon2.png", "label2")
    oToolbar.addSeparator()
    oToolbar.addAction("app:/icon3.png", "label3")
    The "click event" is passed the "label" as a parameter.

    And yes they can be placed in a container but rememeber to (a) set their height and (b) make them visible.
    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

  10. #10
    Toolbox is very cool. Is there a way to specify the caption of the individual bars?

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