Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Tab width in add

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Tab width in add

    Hi. I am developing an add on window based on the framework. Unlike the standard example below the window will be more narrow than wide. I just need a way to control the tab width. As shown below when the tab name is very short the tab will not compress beyond a certain width. How can I override this default setting to directly control the tab width. Also, need this as c# as opposed to xaml.

    Thanks!

    Click image for larger version

Name:	Tab.png
Views:	205
Size:	8.8 KB
ID:	1127189

    #2
    Hello Bidder,

    Thank you for the post.

    I took a look at the addon sample that we provide however the only way that I can see to effectively modify the tab width is to modify the skin and the margins being used in the platform.

    Is your tool intended to have multiple tabs or were you just trying to make that smaller to hide it? If you are trying to make a tool without tabs I could make a suggestion on how to do that.

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Sorry for the delay. Below is the actual size of the screen. This looks a lot like the built in time and sales but it's not - its an addon window based on the addon framework example.

      Anyway. I want to add more tabs and have them visible but each tab is the width of the available space.

      Click image for larger version

Name:	a3.png
Views:	190
Size:	8.4 KB
ID:	1132526

      Comment


        #4
        Hello Bidder,

        Thank you for the details.

        Will you need an unlimited number of tabs including the cycling buttons like shown or just a few tabs? If a few tabs then using buttons in a grid would be a better option here and then creating tab changing logic in the button events. You could still use the tabs but the tab control headers could be hidden. If you needed cycling like this and the small size of the window you would very likely need to change the skin to have less margin.

        I look forward to being of further assistance.
        JesseNinjaTrader Customer Service

        Comment


          #5
          By the phrase "change the skin to have less margin" are you indicating that the size of the tabs is controlled by the skin? If so, I would be interested in a more detailed understanding of how to perform this operation . Thx

          Comment


            #6
            Hello Bidder,

            The various display aspects in the platform are controlled by the skins. The tabs would consist of multiple sizing requirements like margin padding and the textbox sizing styles as well. I am not aware of a specific key in the skin that would control the sizing of just the tabs width however the general sizing could be controlled with a combination of skin margin settings for the overall platform. That would everything else in the platform so that is not really an advisable approach to try and control the width of your addon tabs. It would likely be more suggestible to increase the window size to allow the standard themes to work or create a custom set of buttons for the purpose of navigating the addon.

            You can read more about skins in the following link: https://ninjatrader.com/support/help...hlightsub=skin

            I look forward to being of further assistance.

            JesseNinjaTrader Customer Service

            Comment


              #7

              Blueprint.xaml

              Code:
                  <!-- Tab Control -->
                  <system:Double            x:Key="TabControlItemMinWidth">60</system:Double>

              Comment


                #8
                Thanks for the trick Bidder

                Click image for larger version

Name:	92.png
Views:	12
Size:	2.2 KB
ID:	1318753

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Mirasol, Today, 11:32 AM
                2 responses
                17 views
                0 likes
                Last Post Mirasol
                by Mirasol
                 
                Started by Scalper1969, 10-09-2024, 10:37 AM
                13 responses
                42 views
                0 likes
                Last Post Scalper1969  
                Started by MikM45, 10-12-2024, 01:12 PM
                1 response
                16 views
                0 likes
                Last Post NinjaTrader_LuisH  
                Started by CDXTrader, Today, 01:46 PM
                0 responses
                6 views
                0 likes
                Last Post CDXTrader  
                Started by Joseph Davidow, 10-04-2024, 08:48 AM
                19 responses
                86 views
                0 likes
                Last Post Joseph Davidow  
                Working...
                X