
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I can make it even simpler:
w7_s_p4_EDIT_Comment_2((string)w6_d_p5_S_EDIT_Spin_the_value());
Theoretically, you could do it this way:
w7_s_p4_EDIT_Comment_2(w6_d_p5_S_EDIT_Spin_the_value());
The compiler itself converts double to string, but I wouldn't want to recommend it.
I don't really understand the question, so my answer may be off-topic.
You can do it like this:
The double function returns a variable of string type by forced conversion in the value return step.
Theoretically this could be done:
The compiler itself will convert double to string, but I don't recommend it.
Continuing the topic of setting properties and returning and forwarding values between elements.
We looked at several options:
1. Set text in a text input field.
w7_s_p4_EDIT_Comment_1("Some random text");
2. Assigned a new value to the slider.
w6_i_p3_H_SLIDER_Roll_the_value(33);
3. Selected an arbitrary number for the input field with buttons.
w6_d_p5_S_EDIT_Spin_the_value(423.11);
4. Sent multiple text strings to the cells in the Account Info table.
5. Finally, we returned the new value of the S_EDIT element and sent it to two different windows: the cell in the Account Info table and the text input field in the Settings window example 2.
double Spin_edit_value = w6_d_p5_S_EDIT_Spin_the_value();//Делаем возврат значения параметра (тип double).
w7_s_p4_EDIT_Comment_2((string)Spin_edit_value);
//---------------------------------------------------------------------------------------------------
To complete this topic and move on to the next one, we need to do a few things:
1. change the colour of the slider bar.
2. Change the colour of the S_EDIT base and text.
3. Change the colours of the button in the pressed and unpressed states.
4. Check sending values to elements on timer event.
//---------------------------------------------------------------------------------------------------
1. change the colour of the slider bar:
Result:
Assign a different colour to the slider bar:
Result:
//---------------------------------------------------------------------------------------------------
2 Change the colour of the text and the base of the S_EDIT element:
Let's get the original colour of the base of the input field with buttons:
Output it to the log:
Assign a different colour to the base of the field:
Result:
Setting the text colour of the S_EDIT field. (The property prefix p4 is used instead of p5, because I forgot to add the text colour property for S_EDIT. the bug will be fixed in the next version).
//---------------------------------------------------------------------------------------------------
3. Change the colours of the button in pressed and unpressed states:
Change the colour of the button in the neutral state:
Set a different colour for the activated state of the button:
You can also change the text colour of the button for neutral and pressed states, but on a small font this is not noticeable. Therefore, let's choose a different window:
Result:
Result:
//---------------------------------------------------------------------------------------------------
4. Check sending values to elements on timer event:
Result:
//------------------------------------------------------------------------------------------------
This completes this topic.
Next, we move on to topics:
9. Return of the previous value (_V_LAST). When and for what cases the last value is required (not to be confused with the current value).
10. Test the setting of ON/OFF/LOCK_ON/LOCK_OFF/LOCK/UNLOCK states for different types of elements.
Inside the w7_s_p4_EDIT_Comment_2 function, then convert the type
You can. But there will be an additional warning, because it is an implicit type conversion. Technically, you can just send a number. Without a variable. I leave it to everyone's discretion.
Inside the w7_s_p4_EDIT_Comment_2 function, then convert the type
There is nothing inside the w7_s_p4_EDIT_Comment_2 function. It is a wrapper calling the central function. And the wrapper function can only return a value of its own type.
Can't the w7_s_p4_EDIT_Comment_2 function generate a corresponding overloaded version that takes type double?
w7_s_p4_EDIT_Comment_2 function has nothing inside . It is just a wrapper that calls a central function. Wrapper functions can only return values of their own type.
It can't, because it is a wrapper. There is no need to complicate it. All the work is done by the central function.Right.
Today, let's look at four topics:
9. Returning the previous _V_LAST value .
10. Setting the ON/OFF/LOCK_ON/LOCK_OFF/LOCK/UNLOCK states for different types of elements.
11. Synchronisation of parameter changes: e.g. input field with buttons and slider. The goal is that when the first value changes, the second value changes accordingly. Let's set up communication first in one window, then between windows.
12. Programmatically reset the range boundaries of the slider and the field with buttons.
//---------------------------------------------------------------------------------------------------------
So far we have covered the following topics:
1. Orientation in the list of intellisense and selecting the function of the desired window.
2. Software opening and closing of windows.
3. Orientation in the list of intellisense and selection of the required element in the required window.
4. navigating through lists of individual element properties.
5. Parsing the name of an element and window wrapper function.
6. returning the parameter value of a selected element to a variable of its type. Consider three types of several different elements.
7. Setting values in the parameters of different types of elements. Let's see how the values will appear in the interface windows of these elements.
8. Returning the parameter values of one element, modifying and forwarding that value to another element. Consider different types of elements and values, and test forwarding between different types of elements in different windows.
9. Return previous value (_V_LAST). When and for what cases the last value is required (not to be confused with the current value).
10. Test the setting of ON/OFF/LOCK_ON/LOCK_OFF/LOCK/UNLOCK states for different types of elements.
11. Let's try to link and synchronise changes of values of elements of different types: for example, input field with buttons and slider. Let's assume that when the value of one element (manual or software) changes, the value in the second element changes accordingly.
12. Let's try to programmatically reset the range boundaries of the slider and the input field with buttons via wrapper functions. I haven't had time to test it, but something suggests that it will work. However, let's see.
13. Let's try to return element states through wrapper functions. It is included in the functionality, but I haven't had time to test it. So we'll see... The result is unknown.
14. Let's get and set colours for text and element bases. We can try to associate these colours with some simple events or value boundaries.
15. I'll tell you more about how to navigate and read the new API file printout.