Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to fix the width of the SuperDOM standard ladder columns

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

    How to fix the width of the SuperDOM standard ladder columns

    Hi,

    The width of the additional SuperDOM columns is adjustable. But I cannot figure out how to fix the width of the three standard columns of the ladder.

    See the attached capture. I cannot see any use case for columns where these columns are 500+ pixels wide. It cannot be prevented when widening the window to see additional columns which I am in the process of scripting right now.

    I think I already know the answer to this. But I cannot figure out how to access these columns in an Addon, and I have already figured out some pretty intricate stuff about the SuperDOM.

    Please help.

    Thanks.
    Attached Files

    #2
    Hello xcondor,

    Thank you for your note.

    This would not be supported however may be possible.

    You could use Microsoft Inspect to find the Superdom Automation Control, find that objects Parent, and insert a control before the Superdom control. This would not be setting the pixels, rather condensing the 3 columns through adding another grid.
    Below is an example of adding buttons to the bottom of a Superdom, which would be condensing the upper grid. This approach would be similar, but vertical rather than horizontal.

    https://ninjatrader.com/support/foru...d=9&linkid=945

    Below is a video on using Inspect.
    https://ninjatrader.com/support/foru...08&postcount=2

    Please let us know if you need further assistance.
    Alan P.NinjaTrader Customer Service

    Comment


      #3

      Old thread, but I too needed to correct SuperDOM's goofy stretching behavior. There's no need for using the inspect tool or anything like that. There are multiple nested grids that compose SuperDom's UI and digging down deep enough to find the controlling grid is all that is needed.

      Alan's ecosystem link above is broken as are most of the ecosystem links, the proper link is specified below.
      https://ninjatraderecosystem.com/use...s-to-superdom/

      Load that Addon into NT and paste the following code directly after line 116 and recompile. Adjust the width values as necessary. Done.


      //Resize ladder grid. More grids within grids
      for(int k=0; k < myGridChild.Children.Count; k++)
      {
      for(int y=0; y < myGridChild.Children.Count; y++)
      {
      Grid DomComponents = myGridChild.Children[y] as Grid;
      if (DomComponents.Name=="grdLadders") DomComponents.Width = 300;
      if (DomComponents.Name=="grdPosition") DomComponents.Width = 300;
      if (DomComponents.Name=="grdOrderOptions") DomComponents.Width = 300;
      }
      }

      Comment


        #4
        Hello Bidder,

        Thank you for sharing your solution!

        I'll bookmark this in case this question comes around again.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by Bidder View Post
          Old thread, but I too needed to correct SuperDOM's goofy stretching behavior. There's no need for using the inspect tool or anything like that. There are multiple nested grids that compose SuperDom's UI and digging down deep enough to find the controlling grid is all that is needed.

          Alan's ecosystem link above is broken as are most of the ecosystem links, the proper link is specified below.
          https://ninjatraderecosystem.com/use...s-to-superdom/

          Load that Addon into NT and paste the following code directly after line 116 and recompile. Adjust the width values as necessary. Done.


          //Resize ladder grid. More grids within grids
          for(int k=0; k < myGridChild.Children.Count; k++)
          {
          for(int y=0; y < myGridChild.Children.Count; y++)
          {
          Grid DomComponents = myGridChild.Children[y] as Grid;
          if (DomComponents.Name=="grdLadders") DomComponents.Width = 300;
          if (DomComponents.Name=="grdPosition") DomComponents.Width = 300;
          if (DomComponents.Name=="grdOrderOptions") DomComponents.Width = 300;
          }
          }
          How would I reduce the width of the space to the left and right of the price ladder? My dom has tons of blank space that is not being used. Regards

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by southpacific001, 02-26-2021, 09:25 PM
          13 responses
          61 views
          0 likes
          Last Post southpacific001  
          Started by punkiy2111, Today, 05:22 PM
          0 responses
          2 views
          0 likes
          Last Post punkiy2111  
          Started by secrettrader, Today, 03:36 PM
          0 responses
          8 views
          0 likes
          Last Post secrettrader  
          Started by t3chn0, Today, 01:03 PM
          1 response
          11 views
          0 likes
          Last Post NinjaTrader_ChrisL  
          Started by jleira, Today, 02:27 PM
          0 responses
          25 views
          0 likes
          Last Post jleira
          by jleira
           
          Working...
          X