Solved those issues using the OpenWindow() funcion in stead of Show() function, and now I got the collapse button activated too..
Now I'd like to add some controls to the window2 and window3 like buttons and checkboxes but I got some error like in the following picture:
I do not bother so much for the reading image errors... Only for the pointer access.. the error is from the line:
CWndContainer::AddToElementsArray(1,m_checkbox1);
I think the window_index should be 0 for the main, 1 for the window2, 2 for the window3 right?
Using one of previous library(article06) had no issues with adding controls to a subwindow.
Now the code for adding controls:
//------------------CheckBox---------------bool CmyPanel_Test2::CreateCheckBox1(constint x_gap,constint y_gap,string text)
{
//--- Store the pointer to the main control
m_checkbox1.MainPointer(m_window2);
//--- Set properties before creation
m_checkbox1.XSize(40);
m_checkbox1.YSize(20);
m_checkbox1.IsPressed(false);
//--- Create a controlif(!m_checkbox1.CreateCheckBox("box1",x_gap,y_gap))
return(false);
//--- Add the object to the common array of object groups
CWndContainer::AddToElementsArray(1,m_checkbox1);
return(true);
}
//---------------Button---------- bool CmyPanel_Test2::CreateIconButton1(constint x_gap,constint y_gap,conststring text)
{
//--- Store the pointer to the main control
m_icon_button1.MainPointer(m_window2);
//--- Properties
m_icon_button1.XSize(115);
m_icon_button1.YSize(22);
m_icon_button1.IconXGap(3);
m_icon_button1.IconYGap(3);
m_icon_button1.TwoState(true);
m_icon_button1.IconFile("Images\\EasyAndFastGUI\\Icons\\bmp16\\stop.bmp");
m_icon_button1.IconFileLocked("Images\\EasyAndFastGUI\\Icons\\bmp16\\stop_gray.bmp");
m_icon_button1.IconFilePressed("Images\\EasyAndFastGUI\\Icons\\bmp16\\start.bmp");
m_icon_button1.IconFilePressedLocked("Images\\EasyAndFastGUI\\Icons\\bmp16\\start_gray.bmp");
//--- Create a controlif(!m_icon_button1.CreateButton(text,x_gap,y_gap))
return(false);
//--- Add the pointer to control to the base
CWndContainer::AddToElementsArray(1,m_icon_button1);
return(true);
}
Please anyone can help, thanks...
PS:I hope not beeing annoying with my threads. Have a nice day.
I would say the text is scaled properly, unlike all the rest of the graphics.
That depends how you look at it. You can either scale up the bitmaps to match the font size of scale down the font size to match the size of the bitmaps.
Scaling up bitmaps is not really something you want to do because unlike vector graphics bitmaps will loose quality when scaled up. The font on the other hand is vector based so can be scaled up and down without loss in quality.
Obviously the bast way to cope with the problem would be to use vector graphics, but I don't think the platform supports it (although I may be wrong here as I don't really do graphics in metatrader).
Personally I scale down the font proportionally to match the DPI.
Anyway, it would be nice if the controls could handle this by default so we don't need to worry about it.
That depends how you look at it. You can either scale up the bitmaps to match the font size of scale down the font size to match the size of the bitmaps.
Scaling up bitmaps is not really something you want to do because unlike vector graphics bitmaps will loose quality when scaled up. The font on the other hand is vector based so can be scaled up and down without loss in quality.
Obviously the bast way to cope with the problem would be to use vector graphics, but I don't think the platform supports it (although I may be wrong here as I don't really do graphics in metatrader).
Personally I scale down the font proportionally to match the DPI.
Anyway, it would be nice if the controls could handle this by default so we don't need to worry about it.
I do not contradict the picture scaling difficulties, I just can spot that the font size change corresponds to the scaled Metatrader application GUI. So if you decrease the font size, you could make the letters rather tiny on the hi-res monitor.
I do not contradict the picture scaling difficulties, I just can spot that the font size change corresponds to the scaled Metatrader application GUI. So if you decrease the font size, you could make the letters rather tiny on the hi-res monitor.
Yes. I agree. It would be better to have the graphics match the size of the font which indeed matches the scaled up MT5 GUI. I was just looking for a way to have this better looking in a way that the font size matches the rest of the graphics.
I guess this is the best we are going to get in a mixed environment of raster & vector graphics.
Hello, I'm glad to see your development work, I found a problem, please explain it to me when you have time, Question: Tree control, how to add to tab type, it doesn't work when I set it to tab mode. Can't get the component added to tab. Thanks! Looking forward to your message.
Hello, the new version of the control editing output part, the keyboard of the right side of the numeric keypad malfunction, input numbers do not respond, only in the left side of the numeric input, please deal with it!
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.
Sorry, modified:
and:
still nothing...
Please help1
Hello,
Solved those issues using the OpenWindow() funcion in stead of Show() function, and now I got the collapse button activated too..
Now I'd like to add some controls to the window2 and window3 like buttons and checkboxes but I got some error like in the following picture:
I do not bother so much for the reading image errors... Only for the pointer access.. the error is from the line:
CWndContainer::AddToElementsArray(1,m_checkbox1);I think the window_index should be 0 for the main, 1 for the window2, 2 for the window3 right?
Using one of previous library(article06) had no issues with adding controls to a subwindow.
Now the code for adding controls:
Please anyone can help, thanks...
PS:I hope not beeing annoying with my threads. Have a nice day.
Hi, The set of controls is really nice and helpful, but it would be even better if you can handle higher DPI setting in a better way.
Obviously, the bitmaps will display correctly, but the text does not. ...
I would say the text is scaled properly, unlike all the rest of the graphics.
I would say the text is scaled properly, unlike all the rest of the graphics.
That depends how you look at it. You can either scale up the bitmaps to match the font size of scale down the font size to match the size of the bitmaps.
Scaling up bitmaps is not really something you want to do because unlike vector graphics bitmaps will loose quality when scaled up. The font on the other hand is vector based so can be scaled up and down without loss in quality.
Obviously the bast way to cope with the problem would be to use vector graphics, but I don't think the platform supports it (although I may be wrong here as I don't really do graphics in metatrader).
Personally I scale down the font proportionally to match the DPI.
Anyway, it would be nice if the controls could handle this by default so we don't need to worry about it.
That depends how you look at it. You can either scale up the bitmaps to match the font size of scale down the font size to match the size of the bitmaps.
Scaling up bitmaps is not really something you want to do because unlike vector graphics bitmaps will loose quality when scaled up. The font on the other hand is vector based so can be scaled up and down without loss in quality.
Obviously the bast way to cope with the problem would be to use vector graphics, but I don't think the platform supports it (although I may be wrong here as I don't really do graphics in metatrader).
Personally I scale down the font proportionally to match the DPI.
Anyway, it would be nice if the controls could handle this by default so we don't need to worry about it.
I do not contradict the picture scaling difficulties, I just can spot that the font size change corresponds to the scaled Metatrader application GUI. So if you decrease the font size, you could make the letters rather tiny on the hi-res monitor.
I do not contradict the picture scaling difficulties, I just can spot that the font size change corresponds to the scaled Metatrader application GUI. So if you decrease the font size, you could make the letters rather tiny on the hi-res monitor.
Yes. I agree. It would be better to have the graphics match the size of the font which indeed matches the scaled up MT5 GUI. I was just looking for a way to have this better looking in a way that the font size matches the rest of the graphics.
I guess this is the best we are going to get in a mixed environment of raster & vector graphics.
Hello, I'm glad to see your development work, I found a problem, please explain it to me when you have time, Question: Tree control, how to add to tab type, it doesn't work when I set it to tab mode. Can't get the component added to tab. Thanks! Looking forward to your message.
Why does 14-2 not show up if you can do it in version 10?
Hello, the new version of the control editing output part, the keyboard of the right side of the numeric keypad malfunction, input numbers do not respond, only in the left side of the numeric input, please deal with it!