| / | Forum |
|
bunnychopper
2007.10.08 20:57
I have three labels that pop up in a custom indicator at the same OBJPROP_YDISTANCE value (all in the same row) but are spaced at different OBJPROP_XDISTANCE values to create columns. Everything works fine on my computer and most other but one of my beta testers has an issue where the three labels are not spaced far enough apart. The text is overlapping and enlarging the OBJPROP_XDISTANCE value fixes the problem on his computer, but if I use his OBJPROP_XDISTANCE values on my computer this it goes off the screen. I played around with the resolution on his computer and my computer and that did not simulate or fix the problem in either case. I could include an extern variable for an OBJPROP_XDISTANCE coefficient but I’m going to have hundreds of people using this I want it to be a simple as possible. OBJPROP_XDISTANCE is the Integer value to set/get anchor X distance object property in pixels. The font I am using is Arial. I know it’s not a equally spaced font like Courier but that shouldn’t make a difference, Plus I don’t want to use Courier because it is much to wide and all my text my not fit on screens with low resolution. Any Ideas? Here is the loop I am using to create the first two labels void create_lable(string name, string value,double x,double y,bool warning) {string font = "Arial"; An example of the Indicator
|
|
Creation of an Automated Trading System You must admit that it sounds alluringly - you become a fortunate possessor of a program that can develop for you a profitable automated trading system (ATC) within a few minutes. All you need is to enter desirable inputs and press Enter. And - here you are, take your ATC tested and having positive expected payoff. Where thousands of people spend thousands of hours on developing that very unique ATC, which will "wine and dine", these statements soundб to put it mildly, very hollow. On the one hand, this really looks a little larger than life... However, to my mind, this problem can be solved. |
|
phy
2007.10.08 20:59
Those distances are in screen pixels If the resolution of the monitor is different, your results may be visually different. 1024x768 will look different than on a 1600x1200 or a newer 1440x 900 One thing I did on a project was to let the user move one of the labels, then have |
|
bunnychopper
2007.10.08 21:06
phy wrote: Those distances are in screen pixels If the resolution of the monitor is different, your results may be visually different. 1024x768 will look different than on a 1600x1200 or a newer 1440x 900 But when I change my screen resolution on my screen the spacing is still the same. Here is the indicator try it yourself. |
|
phy
2007.10.08 21:39
Well, looks OK here too. 23 objects, two columns, no overlap, three columns when there is a trade on. There is a DPI setting in the PC Display options (not MT4), mine is set to 96, what is yours, what is his? (didn't SEEM to do anything to MT4 here) |
|
phy
2007.10.08 21:56
No more ideas... Got a screenshot from the one that is bad? Is "Arial" intalled on the balky machine? |
|
bunnychopper
2007.10.13 06:31
Ok it was the DPI setting his was at 150. I guess I will need to learn to write
a Dll to find the DPI setting.
|