fxDreema

    • Register
    • Login
    • Search
    • Back to the main page
    • Categories
    • Recent
    • Tags
    • Popular
    • Search

    Cannot make Z-Orders work

    Questions & Answers
    3
    4
    1659
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Abade69
      Abade69 last edited by

      I try to draw buttons above lines, for aesthetic reasons:

      0_1488329183650_upload-ebb1bf44-8c5d-441f-8095-b3582f21a00a

      I picked this configuration for the lines:

      0_1488329306046_upload-e279e55b-a6d9-4f58-91d1-7378d316b2b9

      And for buttons:

      0_1488329347070_upload-1447bcbe-8db2-4993-a502-42f5d74e80f1

      The Z-Order for buttons is higher than the Z-Order for lines, but lines still appear above them. If i put lines on the "background" they appear to be behind the buttons, but are also placed behind the bars!

      1 Reply Last reply Reply Quote 0
      • M
        miro1360 last edited by miro1360

        what I think, z-order in mql is meaning not for "visible order" but for selectable order, that means when you have object at deepest bottom with highest z-number, and obove are next objects with lower z-numbers, when you come with mouse above and select object - first object which is selected is one with highest z-number ...
        --- and objects order is based on time when they were created, it means at top of objects is last created object, not object with highest z-number ...
        ... when you will have object as top, you need re-create it 😄

        Between trading and gambling is a very small gap, be careful.

        Abade69 1 Reply Last reply Reply Quote 1
        • Abade69
          Abade69 @miro1360 last edited by

          @miro1360 said in Cannot make Z-Orders work:

          what I think, z-order in mql is meaning not for "visible order" but for selectable order, that means when you have object at deepest bottom with highest z-number, and obove are next objects with lower z-numbers, when you come with mouse above and select object - first object which is selected is one with highest z-number ...
          --- and objects order is based on time when they were created, it means at top of objects is last created object, not object with highest z-number ...
          ... when you will have object as top, you need re-create it 😄

          Thanks a lot miro, that is a lot clear now.

          1 Reply Last reply Reply Quote 0
          • fxDreema
            fxDreema last edited by fxDreema

            Maybe I am wrong. I know what z-order is in the world of websites, but in MQL4 probally means something else. So let's see what they say in the documentation:
            https://www.mql5.com/en/docs/constants/objectconstants/enum_object_property#enum_object_property_integer

            Priority of a graphical object for receiving events of clicking on a chart (CHARTEVENT_CLICK). The default zero value is set when creating an object; the priority can be increased if necessary. When objects are placed one atop another, only one of them with the highest priority will receive the CHARTEVENT_CLICK event.

            And how to make one object to appear above another... I don't know really, maybe the name matters

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            • First post
              Last post

            Online Users

            A
            M
            B
            E
            S
            M

            17
            Online

            146.6k
            Users

            22.4k
            Topics

            122.6k
            Posts

            Powered by NodeBB Forums | Contributors