Gallery of UIs written in MQL - page 33

 
hini #:
Is "END " fixed when setting the end of an element attribute set?
I'm not sure I understand the question exactly, but if we're talking about setting the properties of a single element inside or outside of a group, then no. You don't need to set them. But when multiple initialisation of properties (as in the example above), putting END at the end of the enumeration string is necessary.

"END" is placed at the end of several types of enumerations, which I'll talk about later. But in brief:

1. Enumeration of common properties of homogeneous elements within a particular group, one of the enumeration types with "END" at the end.

2. An enumeration of the elements to be blocked.

3. Enumeration of blocked windows.

4. Enumeration of switchable elements.

5. List of synchronised elements (meaning their parameter).


 
6. Another enumeration with "END" at the end is IS_APPEARANCE_CONTROLLER.

It lists the elements or groups of elements whose phenomena are controlled by a main element assigned by the user.
 

With great regret I found no mention of drawing elements directly on the painted canvas, closing the whole chart. In other words - one "full screen" window, without a frame and close buttons, etc.

That's what I need. Not panels on top of the chart.

If it is not implemented, it is not difficult for you. Add the ability to open a window in the size of the chart and without a frame.

 
Реter Konow #:
I'm not quite sure what the question means, but if we're talking about setting the properties of individual elements inside or outside of a group, then no. You don't need to set them. However, in the case of multiple initialisation of attributes (as in the example above), it is necessary to put "END" at the end of the enumeration string.

"END" is located at the end of several enumeration types, which I'll get to later. Briefly.

1. enumerate the common properties of homogeneous elements in a particular group, which is one of the enumeration types ending in "END".

2. an enumeration of the elements to be blocked.

3. Enumeration of the blocked windows.

4. enumeration of switchable elements

5. a list of synchronised elements (referring to their arguments).


2,3,4,5,6 need actual code to understand.
 
Edgar Akhmadeev size of the chart and without a frame.
There is a scalable dynamic window that expands to the whole chart. It is disabled in this version, but I will add it in the next one. Will this option work?
 
hini #:
You need real code to understand 2,3,4,5,6.
Ok, I will show examples today.
 
Реter Konow #:
There is a scalable dynamic window expanding to the whole chart. It is disabled in this version, but I will add it in the next version. Will this option work?

I don't know what it will be like yet. If the window will expand to the whole chart, keeping the frames and close/minimise buttons - it will be a step forward to my wish. But if drawing of these window elements is already implemented, it is easy to disable this drawing with the FULL_SCREEN flag . Your graphic designer looks like that.

There are a lot of questions, I don't ask while the process of publishing lessons is going on. Something will become clearer in time.

 
Edgar Akhmadeev #:

1. I don't know what it will be like yet. If the window will expand to the whole chart, preserving frames and close/minimise buttons - it will be a step forward to my wish. But if drawing of these window elements is already implemented, it is easy to disable this drawing with the FULL_SCREEN flag . That's what your graphic designer looks like.

There are a lot of questions, I don't ask while the process of publishing lessons is going on. Something will become clearer in time.

1. I will think over the option of "over-expanding" the dynamic window with the frames going out of the field of view when clicking on a special zone, for example, the upper left corner. But this will be done later. I will release a regular dynamic window first.

2. I understand, good.

 

Since the KIB markup language has no depth of complexity and the further material is as easy to learn as the initial one, I will deviate from the order of presentation and give the enumerations ending with the k.word "END".

1. The first enumeration we learnt in the previous examples: mass setting of properties of elements of the same type within a group.

  • It is necessary to write i ( in this language it translates as"this group").
  • Put the type of elements whose properties we are going to set in plural, e.g. BUTTONS.
  • List the properties and values in commas (without _,) for example: W , 200, H,30, N_COLOR, (uint)clrRed, A_COLOR, (uint)clrGreen, P_COLOR, (uint)clrYellow,....,
  • Put END at the end of the enumeration.

When properties are initialised multiple times, this rule works for all elements. Properties not mentioned in the enumeration will retain their default values, or the values that were set by the user before the enumeration string.


1.

Aproperty of an element ALWAYS has the last value set.

In this picture, all buttons except the top button have a default height value. The top button has been assigned a height of 50px by the user. Below in the code, this value is not overridden because the button property enumeration is set to WIDTH (120 px) only.



2.

Here, the previously set "button 1" button height value is overwritten with the new value in the enumeration line and no longer works.



3. And in this example, the value set in the enumeration for one specific button in the row below the enumeration is overwritten:



 

Code:

Option 1:


//------------------------------------------------------
GROUP, A,
 
__, CHECKBOX, "Checkbox 1",         BUTTON, "button 1", H, 50, 
__, CHECKBOX, "Checkbox 2",         BUTTON, "button 2",          
__, CHECKBOX, "Checkbox 3",         BUTTON, "button 3",        
__, CHECKBOX, "Checkbox 4",         BUTTON, "button 4",           
__, CHECKBOX, "Checkbox 5",         BUTTON, "button 5",           
__, CHECKBOX, "Checkbox 6",         BUTTON, "button 6",         

END_GROUP,
//--------------------------
//--------------------------
// SET PROPERTIES EXPLICITLY FOR BUTTONS
//--------------------------
i, BUTTONS,     W, 120,   END,
//--------------------------
// SET PROPERTIES EXPLICITLY FOR CHECKBOXES
//--------------------------
i, CHECKBOXES,  W, 90,    END,
//--------------------------
//--------------------------
//SET GROUP POSITION:
//--------------------------
i, AT, _X2X, "MF", 10, _Y2Y, "MF", 10,
//--------------------------
i, X_GAP, 30,
i, Y_GAP, 40,
//--------------------------


Option 2:

//------------------------------------------------------
GROUP, A,
 
__, CHECKBOX, "Checkbox 1",         BUTTON, "button 1"  
__, CHECKBOX, "Checkbox 2",         BUTTON, "button 2",          
__, CHECKBOX, "Checkbox 3",         BUTTON, "button 3",        
__, CHECKBOX, "Checkbox 4",         BUTTON, "button 4",           
__, CHECKBOX, "Checkbox 5",         BUTTON, "button 5",           
__, CHECKBOX, "Checkbox 6",         BUTTON, "button 6",         

END_GROUP,
//--------------------------
//--------------------------
// SET PROPERTIES EXPLICITLY FOR BUTTONS
//--------------------------
i, BUTTONS,     W, 120, H, 20,  END,
//--------------------------
//OVERWRITE PREVIOUS VALUE FOR THIS SPECIFIC BUTTON.
//--------------------------
   "button 1", H, 50,
//--------------------------
// SET PROPERTIES EXPLICITLY FOR CHECKBOXES
//--------------------------
i, CHECKBOXES,  W, 90,    END,
//--------------------------
//--------------------------
//SET GROUP POSITION:
//--------------------------
i, AT, _X2X, "MF", 10, _Y2Y, "MF", 10,
//--------------------------
i, X_GAP, 30,
i, Y_GAP, 40,
//--------------------------