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.



    Below is a video on using Inspect.


    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.


      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.


          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 guillembm, Yesterday, 11:25 AM
          2 responses
          9 views
          0 likes
          Last Post guillembm  
          Started by junkone, 04-21-2024, 07:17 AM
          9 responses
          68 views
          0 likes
          Last Post jeronymite  
          Started by trilliantrader, 04-18-2024, 08:16 AM
          4 responses
          18 views
          0 likes
          Last Post trilliantrader  
          Started by mgco4you, Yesterday, 09:46 PM
          1 response
          11 views
          0 likes
          Last Post NinjaTrader_Manfred  
          Started by wzgy0920, Yesterday, 09:53 PM
          0 responses
          10 views
          0 likes
          Last Post wzgy0920  
          Working...
          X