Anatol, can you tell me if it is possible to dynamically change the process description in the progress bar?
Suppose we have some array of symbol names. We loop through this array and get the character names. Then each symbol is processed by the programme to get data from it. The overall cycle is displayed by one progress bar, but I would like to display the process of processing each individual symbol. Accordingly, and sign the name of the process "processing CMG", then, when processing the next, already write another name of the process: "processing EQIX", etc.
It is not known in advance what symbols may be in the array - i.e. it will not be possible to prepare a bunch of progress bars, and it is not optimal with more than a thousand names of different symbols....
Anatol, can you tell me if it is possible to dynamically change the process description in the progress bar?
Suppose we have some array of symbol names. We loop through this array and get the character names. Then each symbol is processed by the programme to get data from it. The overall cycle is displayed by one progress bar, but I would like to display the process of processing each individual symbol. Accordingly, and sign the name of the process "processing CMG", then, when processing the next, already write another name of the process: "processing EQIX", etc.
You don't know in advance what symbols may be in the array - i.e. you can't prepare a bunch of progress bars, and it's not optimal with more than a thousand names of different symbols....
There is no such method now. In the next update I will add this feature for each element that has a text description. That is, it will be possible to change the text after the item is created.
Anatoli Kazharski: Right now there is no such method. In the next update I will add this feature for each element that has a text description. That is, it will be possible to change the text after the item is created.
Thanks, looking forward to it ;)
Question: in your examples you have this code for building a progress bar:
//+------------------------------------------------------------------+//| Creates a progress bar|//+------------------------------------------------------------------+bool CProgram::CreateProgressBar(constint x_gap,constint y_gap)
{
//--- Save the pointer to the form
m_progress_bar.WindowPointer(m_window);
//--- Coordinatesint x=m_window.X()+x_gap;
int y=m_window.Y()+y_gap;
//--- Set properties before creation
m_progress_bar.YSize(15);
m_progress_bar.BarYSize(11);
m_progress_bar.BarXOffset(65);
m_progress_bar.BarYOffset(2);
m_progress_bar.BarBorderWidth(1);
m_progress_bar.LabelText("Processing:");
m_progress_bar.AreaColor(C'225,225,225');
m_progress_bar.BarAreaColor(clrWhiteSmoke);
m_progress_bar.BarBorderColor(clrWhiteSmoke);
m_progress_bar.IsDropdown(true);
m_progress_bar.AutoXResizeMode(true);
m_progress_bar.AutoXResizeRightOffset(230);
//--- Creating an elementif(!m_progress_bar.CreateProgressBar(m_chart_id,m_subwin,x,y))
return(false);
//--- Hide element
m_progress_bar.Hide();
//--- Add a pointer to the element in the base
CWndContainer::AddToElementsArray(0,m_progress_bar);
return(true);
}
//+------------------------------------------------------------------+
Zero response. Apparently, in the Update method, in addition to changing the index and total values, it is necessary to specify the other m_indicator_color and so on. Otherwise these methods are not applied anywhere except during creation. Or was this the way it was intended?
... Otherwise, these methods don't apply anywhere except at creation. Or was that the way it was intended?
Yes, this is a temporary version. Soon (in the next few articles) there will be massive updates for all controls, where you can change any property at runtime.
Anatoli Kazharski: Yes, this is a temporary version. Soon (in the next few articles) there will be massive updates for all controls, where you can change any property at runtime.
That's excited. In the meantime, I found a temporary solution:
//+------------------------------------------------------------------+//|| Updates the progress bar|//+------------------------------------------------------------------+void CProgressBar::Update(constint index,constint total)
{
//--- Set new index
CurrentIndex(index);
//--- Set new range
StepsTotal(total);
//--- Calculate the width of the indicatordouble new_width=(m_current_index/m_steps_total)*m_bar_bg.XSize();
//--- Adjust if less than 1if((int)new_width<1)
new_width=1;
else
{
//--- Adjust for the width of the frameint x_size=m_bar_bg.XSize()-(m_bar_border_width*2);
//--- Correct if out of boundsif((int)new_width>=x_size)
new_width=x_size;
}
//--- Set a new width for the indicator
m_indicator.X_Size((int)new_width);
//--- Calculate the percentage and form a stringdouble percent =m_current_index/m_steps_total*100;
string desc =::DoubleToString((percent>100)? 100 : percent,m_digits)+"%";
//--- Set the new value
m_percent.Description(desc);
m_indicator.BackColor(m_indicator_color);
m_indicator.Color(m_indicator_color);
}
172218684: You all to this gold combat shouting single group 172218684 172218684 , will continue to earn profits, single here shouting Verification - strength is priceless!
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Anatol, can you tell me if it is possible to dynamically change the process description in the progress bar?
Suppose we have some array of symbol names. We loop through this array and get the character names. Then each symbol is processed by the programme to get data from it. The overall cycle is displayed by one progress bar, but I would like to display the process of processing each individual symbol. Accordingly, and sign the name of the process "processing CMG", then, when processing the next, already write another name of the process: "processing EQIX", etc.
It is not known in advance what symbols may be in the array - i.e. it will not be possible to prepare a bunch of progress bars, and it is not optimal with more than a thousand names of different symbols....
Anatol, can you tell me if it is possible to dynamically change the process description in the progress bar?
Suppose we have some array of symbol names. We loop through this array and get the character names. Then each symbol is processed by the programme to get data from it. The overall cycle is displayed by one progress bar, but I would like to display the process of processing each individual symbol. Accordingly, and sign the name of the process "processing CMG", then, when processing the next, already write another name of the process: "processing EQIX", etc.
You don't know in advance what symbols may be in the array - i.e. you can't prepare a bunch of progress bars, and it's not optimal with more than a thousand names of different symbols....
Right now there is no such method. In the next update I will add this feature for each element that has a text description. That is, it will be possible to change the text after the item is created.
Thanks, looking forward to it ;)
Question: in your examples you have this code for building a progress bar:
what is the sign of the dropdown element for:
m_progress_bar.IsDropdown(true);???
Question: you have this code for building a progress bar in your examples:
what is the purpose of the dropdown element trait:
???
To avoid showing the progress bar when the form is expanded, when it should not be visible.
Does this apply to any objects that can be built using your library?
Dynamically changing progress bar properties does not work.
For example, I wanted to change the colour:
Zero response. Apparently, in the Update method, in addition to changing the index and total values, it is necessary to specify the other m_indicator_color and so on. Otherwise these methods are not applied anywhere except during creation. Or was this the way it was intended?
... Otherwise, these methods don't apply anywhere except at creation. Or was that the way it was intended?
Yes, this is a temporary version. Soon (in the next few articles) there will be massive updates for all controls, where you can change any property at runtime.
That's excited. In the meantime, I found a temporary solution:
You all to this gold combat shouting single group 172218684 172218684 , will continue to earn profits, single here shouting Verification - strength is priceless!
Liar