Люди. Граждане! Огромная просьба - заполняйте свой профиль на сайте и пользуйтесь стандартными программами - устанавливайте Skype. У Skype есть очень полезная функция - показ рабочего стола. В таком случае можно оперативно подсказать по возникшей проблеме. Помните - время - деньги! Древняя народная мудрость гласит: если хочешь помочь...
[in] Номер подокна графика. 0 означает главное окно графика. Указанное подокно должно существовать, в противном случае функция возвращает false. Возвращает true при успешной постановке команды в очередь указанного графика, иначе false. Если объект был уже создан ранее, то производится попытка изменить его координаты. При вызове ObjectCreate...
When we create panels with the library how do we put the panel in a corner that is different form the topleft?
I fiddled with OBJ_PROP_Corner but I think there is a better way by using Panel.Align and Panel.Alignment. I played around but as a non programmer I don't know what parameters to pass and how to pass them. For example the Panel.Alignment(CRect &rect) what do those Rect things mean?
When we create panels with the library how do we put the panel in a corner that is different form the topleft?
I fiddled with OBJ_PROP_Corner but I think there is a better way by using Panel.Align and Panel.Alignment. I played around but as a non programmer I don't know what parameters to pass and how to pass them. For example the Panel.Alignment(CRect &rect) what do those Rect things mean?
Any light much appreciated
cheers
Diego
At the time of creating the panel, we indicate the coordinates. Example for the file AppWindowEditDefine.mq5
//+------------------------------------------------------------------+//| Expert initialization function |//+------------------------------------------------------------------+intOnInit()
{
***
//--- create application dialogif(!ExtDialog.Create(0,"AppWindow Edit Define",0,40,40,380,344))
return(INIT_FAILED);
//--- run application
I noticed that often times the *.Destroy() function simply doesn't work. It leaves objects on the chart after the Expert Deinit() function is called, especially when rapidly changing timeframes.
A simple workaround is to use pointers, instead of directly creating, modifying, and destroying the CAppDialog object.
CAppDialog *AppWindow;//Declare CAppDialog pointer
AppWindow = new CAppDialog();//Create new CAppDialog object at ptr address
AppWindow.Destroy(...);//Destroy Window object(s)
delete AppWindow;//Set the "delete" flag for objects at the ptr address (in case *.Destroy() fails)
AppWindow = NULL;//Set the ptr address to NULL
After building my custom window class, I also create and destroy all Buttons, Panels, and other objects like this. Works like a charm!
*Note: Setting the delete flag and pointer to NULL might be overkill, but I have not had left-over objects since implementing.
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.
Vladimir why when closing one panel both panels close? how to avoid this?
Set different names for each window - AppWindow and AppWindow1 etc.
they already have different names
Changing the string
doesn't do anything.
Or do you mean something else?
*** how to avoid this?
One advisor - one panel.
For example on top of a line:
How to make a panel be on top of objects created later than the panel itself?
For example, over a line:
Don't create graphical objects after the panel is created.
Or collapse/expand the panel.Hey Guys,
question from a self learner!
When we create panels with the library how do we put the panel in a corner that is different form the topleft?
I fiddled with OBJ_PROP_Corner but I think there is a better way by using Panel.Align and Panel.Alignment. I played around but as a non programmer I don't know what parameters to pass and how to pass them. For example the Panel.Alignment(CRect &rect) what do those Rect things mean?
Any light much appreciated
cheers
Diego
Hey Guys,
question from a self learner!
When we create panels with the library how do we put the panel in a corner that is different form the topleft?
I fiddled with OBJ_PROP_Corner but I think there is a better way by using Panel.Align and Panel.Alignment. I played around but as a non programmer I don't know what parameters to pass and how to pass them. For example the Panel.Alignment(CRect &rect) what do those Rect things mean?
Any light much appreciated
cheers
Diego
At the time of creating the panel, we indicate the coordinates. Example for the file AppWindowEditDefine.mq5
I noticed that often times the *.Destroy() function simply doesn't work. It leaves objects on the chart after the Expert Deinit() function is called, especially when rapidly changing timeframes.
A simple workaround is to use pointers, instead of directly creating, modifying, and destroying the CAppDialog object.
The above functions now become this:
After building my custom window class, I also create and destroy all Buttons, Panels, and other objects like this. Works like a charm!
*Note: Setting the delete flag and pointer to NULL might be overkill, but I have not had left-over objects since implementing.