Announcement

Collapse
No announcement yet.

Help with buttons

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

  • Help with buttons

    I just started working with buttons with drawTextAbsolute and last night had set up a screen of buttons on an advanced chart. Much to my dismay, when I increased the number of bars on my advanced chart, my screen of buttons compressed onto the left side of the screen , commensurate with the spacing I had specified in my drawTextAbsolute steps and the number of bars on the chart. I should have known this would happen, but alas...

    I went looking for a function that would determine the number of bars on the visible chart so I could incorporate this into the code to have the location of the buttons adjust themselves to the number of the bars visible on the chart, but the ones I found dealt with the number of bars loaded, not in the visible chart.

    Does anyone know what function I could use to accomplish this?

  • #2
    Try this...

    There is a relatively new (undocumented command) called...

    drawTextPixel(ButtonxStart+2, ButtonYStart-5,....);

    It uses the same inputs as drawTextRelative()

    Try switching your "absolute" to this new button type. You might find you like it and can use it..

    I used it in my TradeButtons PT application..

    Brad
    Brad Matheny
    eSignal Solution Provider since 2000

    Comment


    • #3
      Brad,

      Yes! Found it in Chris's help file! (Kryza) This is a different way to accomplish what I want, but is more effective.

      Thanks!

      Comment


      • #4
        Brad,

        It works perfectly!

        Thanks again

        Comment


        • #5
          This is working well, however, the Text.RELATIVETOBOTTOM flag does not seem to work. here is my line of code.

          drawTextPixel(i, j, message + "@URL=EFS:callSH", Color.black, Color.aqua, Text.RELATIVETOBOTTOM | Text.ONTOP , "Comic Sans MS", 13, xy);

          I am using eSignal 7.4 (Build 608)

          Any Insight?

          Comment


          • #6
            Hello Steve,

            There is a bug here. The RELATIVETOBOTTOM flag is being treated the same as RELATIVETOTOP. I've reported this problem to our development team. For now, you'll have to use RELATIVETOTOP with a larger pixel value.

            When you were using drawTextAbsolute() earlier, we're you using the RELATIVETOLEFT and RELATIVETOBOTTOM flags?
            Jason K.
            Project Manager
            eSignal - an Interactive Data company

            EFS KnowledgeBase
            JavaScript for EFS Video Series
            EFS Beginner Tutorial Series
            EFS Glossary
            Custom EFS Development Policy

            New User Orientation

            Comment


            • #7
              Thanks for the feedback and looking into this.
              When you were using drawTextAbsolute() earlier, we're you using the RELATIVETOLEFT and RELATIVETOBOTTOM flags?
              Yes, I had been using several drawTextAbsolute() statements with these flags to anchor buttons to the bottom of the screen in addition to other drawTextAbsolute() statements with the RELATIVETOLEFT and RELATIVETOTOP flags to anchor buttons to the top of the screen.

              On a related subject it would be nice to have a function similar to setStudyMax() and setStudyMin() which could be used to specify the number of pixels on either the top, bottom, left or right (or maybe a user defined window) of an advanced chart which would be reserved for text such that the bars would not print over text buttons on the screen, yet still allow advanced chart auto scaling within the remaining available space.

              For example, setStudyExcludePixels(xmin,ymin,xmax,ymax) would reserve a window on the screen, where, if anchored to the bottom,left or top of the screen would still allow for advanced chart auto scaling within the remaining available space.

              Regards,

              Comment


              • #8
                Hello Steve,

                Is your formula doing anything that requires it to be a price study? If not, you could have all your buttons drawn in a non-price study window and use the setStudyMin() and setStudyMax().
                Jason K.
                Project Manager
                eSignal - an Interactive Data company

                EFS KnowledgeBase
                JavaScript for EFS Video Series
                EFS Beginner Tutorial Series
                EFS Glossary
                Custom EFS Development Policy

                New User Orientation

                Comment


                • #9
                  Jason,

                  I had not thought of that, however in hindsight, it is a very easy solution to at least part of my request, bravo! Now in my case, I have a price study associated with this, however, I believe I can make this work!

                  I'd still like to be able to reserve a space on the price study that would not be overwritten by the bars...maybe in a future revision?


                  Any idea if the issue with drawTextPixel and the bug with the flags will be fixed in the next couple of revisions? If so, how can I determine when it is fixed (short of trying it)?


                  Thank You

                  Comment


                  • #10
                    Hello Steve,

                    Your best option for suggesting new features of modifications to the software is through [email protected].

                    It was explained to me that the RELATIVETOBOTTOM flag was not developed for drawTextPixel(). I have requested to have that ability added to this function.

                    When you install a version of eSignal, open Readme.txt from the \eSignal\ root directory. All new EFS features are described in that document.
                    Jason K.
                    Project Manager
                    eSignal - an Interactive Data company

                    EFS KnowledgeBase
                    JavaScript for EFS Video Series
                    EFS Beginner Tutorial Series
                    EFS Glossary
                    Custom EFS Development Policy

                    New User Orientation

                    Comment


                    • #11
                      Jason,

                      Thank you for the suggestions and information, you have been very helpful.

                      Regards,

                      Comment


                      • #12
                        Jason,

                        Just a follow-up, I just noticed today that the issue regarding drawTextPixel has been fixed in 7.5
                        There is a bug here. The RELATIVETOBOTTOM flag is being treated the same as RELATIVETOTOP. I've reported this problem to our development team. For now, you'll have to use RELATIVETOTOP with a larger pixel value.

                        Hats off to eSignal technical support for helping me troubleshoot a problem I was having, then providing me a work around to the issue, then providing the functionallity in the next product update. You have an excellent product and provide/facilitate outstanding support through this Bulletin Board.

                        Regards,

                        Comment

                        Working...
                        X