Download MetaTrader 5

Sub Window height can't be changed manually after sub window size changed using CHART_HEIGHT_IN_PIXELS programmatically. Is it MT4 bugs???

To add comments, please log in or register
Young Ho Seo
24032
Young Ho Seo  

Hi all.

I have recently used ChartSetInteger function to programmatically change sub window height (MT4 latest build 830). Once this code is applied to the chart, then I can't change sub window size manually afterwards.

It seems the code fixes the sub window height and even if I drag my mouse around the border, they don't even move by 1 pixel.

Does anyone experience similar bugs or errors like this or it this suppose to work like this ?

What would be possible solution to fix this problems ?

Your thought will be really appreciated.

Kind regards.

 

    if(!ChartSetInteger(0,CHART_HEIGHT_IN_PIXELS, 1, subWindowPixels))
    {
        //--- display the error message in Experts journal
        Print(__FUNCTION__+", Error Code = ",GetLastError());
        return;
    }     
Ex Ovo Omnia
3381
Ex Ovo Omnia  
Young Ho Seo:

Hi all.

I have recently used ChartSetInteger function to programmatically change sub window height (MT4 latest build 830). Once this code is applied to the chart, then I can't change sub window size manually afterwards.

It seems the code fixes the sub window height and even if I drag my mouse around the border, they don't even move by 1 pixel.

Does anyone experience similar bugs or errors like this or it this suppose to work like this ?

What would be possible solution to fix this problems ?

Your thought will be really appreciated.

Kind regards.

 

From my point of view it is intended behaviour. Set the height to zero for unlocking. 

There are other bugs related to the fixed window height though.

1. If you combine two subwindows, the upper one with fixed height, the lower with variable height, then try to resize the lower window, you might realize it is very difficult or impossible.

2. You may have two fixed size windows, then release the fixed size of the lower one by setting its height to zero. The lower subwindow might collapse:


3. If you resize the main window with fixed size subwindow, and entire chart might collapse:

 

Young Ho Seo
24032
Young Ho Seo  
Ovo Cz:

From my point of view it is intended behaviour. Set the height to zero for unlocking. 

There are other bugs related to the fixed window height though.

1. If you combine two subwindows, the upper one with fixed height, the lower with variable height, then try to resize the lower window, you might realize it is very difficult or impossible.

2. You may have two fixed size windows, then release the fixed size of the lower one by setting its height to zero. The lower subwindow might collapse:


3. If you resize the main window with fixed size subwindow, and entire chart might collapse:

 

This is really super demonstration of sub window size.

I got my problem solved immediately. Thanks so much Ovo.

By setting CHART_HEIGHT_IN_PIXELS = 0, you can unlock you sub window (i.e. now you can manually change your sub window size.)

However I was never be able to find such a information from MQL4 help documents though. :)

Anyway, if one working with sub window, these two video must be watched. Very good demonstration. :)


ChartSetInteger(0,CHART_HEIGHT_IN_PIXELS, 1, 0)
To add comments, please log in or register