I can’t believe I can’t figure this out but here goes…
A few months ago I finally started moving from 3.5 to 5.2 and now 6. Moved existing solutions and everything has gone fairly smoothly. But now for the world of me I can’t seem to figure out on a new form how to simply change the background color exactly to match either a) a previously defined form color or b) an RGB defined color.
If I click on the ‘Color Wheel’, ‘Color Palettes’, ‘Image Palettes’ or ‘Crayons’ and then close the color chooser the color selected will then become exactly the background form color. If I go to the ‘Color Sliders’, choose 'RGB Sliders and then enter exactly the RGB numbers, that color will show up in the little box next to the magnifying glass just like the other color chooser methods. However when I close the color chooser window that RGB color that I entered will NOT become the background color. In other words even though I know exactly the RGB color code that I want I can’t seem to get that selected as the background color on a form, label or field. I am entering for instance 182, 251, 182 and it comes out as 169,252,162. If I enter some other set of numbers it will do the same thing, i.e. something close but not the exact number/color. And yet I have other forms that have that exact color, albeit they were imported from 3.5. I can ‘copy’ those colors and I can also set a little ‘custom color’ box at the bottom of the color chooser but there doesn’t seem to be anyway to ‘paste’ a previous color.
Finally for another solution that I have in both 5.2 and 6, I am getting what seems to me even stranger results. In the 5.2 solution, on the main opening form for the web-client it shows the background form colors chosen but NOT for the smart client… In the 6.0 solution it doesn’t show any background form colors at all unless I do it through the ‘style’. Is that the only way to change form background colors in 6.0? The only thing I’ve seen in the wiki for 5.2 or 6 on these matters is for 6 under web-client specific changes: ‘Moved default form background-color into servoy_default_webclient_stylesheet.css’. And that indeed is the case but I can’t seem to override that ‘default’ by setting the background color manually in 6 whether for web or smart client.
I must be overlooking something really basic but I can’t seem to figure these color issues out… Any help greatly appreciated.
This is about since Servoy 5.2. I made a case for this in the support system (quite a long time ago), case # 353609. But Servoy hasn’t corrected this very basic error, which is quite annoying, as you always have to guess to get the correct color. For example, if you enter the color RGB (102, 102, 102) then the color is set to RGB (83, 83, 83) - not very productive to alway guess.
Thanks - that’s a big relief that I’m not just going nuts or completely stupid! I searched on the forum but it’s kind of a hard ‘search’ and I didn’t find anything on this.
Do you get any of the other problems I mentioned with 5.2/6?
With 5.2 where the background form color shows up on web but not smart client? (This is a solution I actually created in 5.2, not imported from 3.5)
With 6 where I can’t seem to set any background form color except with the style sheet? Just seems to ignore the form background property all together when set directly (above solution in 5.2 was imported to 6).
Thanks - that’s a big relief that I’m not just going nuts or completely stupid! I searched on the forum but it’s kind of a hard ‘search’ and I didn’t find anything on this.
Do you get any of the other problems I mentioned with 5.2/6?
Not that I am aware of.
john.allen:
With 5.2 where the background form color shows up on web but not smart client? (This is a solution I actually created in 5.2, not imported from 3.5)
I didn’t notice that, but we are not havely involved in web development, except for the iPhone.
john.allen:
With 6 where I can’t seem to set any background form color except with the style sheet? Just seems to ignore the form background property all together when set directly (above solution in 5.2 was imported to 6).
John
We are currently not developing with Version 6, still Version 5.2.9
I cannot reproduce the issue you’re experiencing with the inability to set a custom background color on forms. If I edit the background property of the Body part of a form, the altered color shows in both the Smart and Web Client. Maybe you marked the form as being transparent?
As for the issue of setting the exact RGB color: On windows I cannot reproduce this: it works fine. I guess you’re on OSX? We did test this however on OSX 10.6.8 (SnowLeopard) with Servoy 6 and could not reproduce it there either: setting the background color of the body part of a Form to RGB values 100,100,100 resulted in Hex color value #646464, which is afaik the correct translation.
Please detail the exact versions and procedure, or maybe make a little recording of what you do exactly.
This is easy to reproduce: Put for example a rectangle on a form. Double click the background property, you get the Color Chooser panel as seen in the attachment. Select in the popup RGB sliders (see screenshot). Enter for Red, Green, and Blue for example the value 100 and close the Color Chooser. Look in Servoy in the background property what values is set. It is 81 instead of 100.
The difference depends on the value set. The higher the value, the greater the difference, as far as I remember.
This error occured around the Servoy version 5.2 and was not there before.
Ok, in 5.2.x we see it as well. So, the good news is that in 6.0 it’s no longer an issue.
I’ll make sure it gets checked if this is fixable in the 5.2 branch, but a quick look suggests that this is a issue in Eclipse/SWT/java. In that case it’s most likely not solvable.
As we are not going to change to version 6 soon (we are in the beginning of a 4 months test phase of our software at the customer site and we must not change our development environment), it would be great to have a correction in the 5.2 branch.
Regards,
pbakker:
Ok, in 5.2.x we see it as well. So, the good news is that in 6.0 it’s no longer an issue.
I’ll make sure it gets checked if this is fixable in the 5.2 branch, but a quick look suggests that this is a issue in Eclipse/SWT/java. In that case it’s most likely not solvable.
Thanks for your info. I did not know that changing an Eclipse version is such a major operation – it is always refered to that an application is “just” a plug-in of Eclipse, which always sounds like an easy task. But as we know, in detail most of the things in IT is more complicated as it is “sold”.
By the way, there is this Eclipse next generation platform, currently in version 4.1. Is Servoy going to migrate to this platform some day in the near future or is this not decided yet?
Regards,
rgansevles:
Robert,
This seems to be a eclipse issue fixed in the version that we use for Servoy 6 (3.6).
Servoy 5 is based on eclipse 3.5.
Unfortulately, we will not upgrade this in Servoy 5 since that is quite a major operation.
Ouch. The ‘no color’ showing in 6 was indeed because I had somehow clicked the transparent option as Paul so excellently surmised. Thanks! I must have done it accidentally or possibly it happened in importing from 5.2 because I’ve never used that function… Not even sure how or for what purpose I would use it.
Still nice to know that the 5.2 color setting by RGB number is a bug so I haven’t completely lost it… There are of course work arounds for that problem if I don’t move that solution right away to 6. Robert you probably already have something like this but what I’m now doing in my case where I want most forms to have the same color is duplicate one of my forms that has the color I want, remove everything from it, have no dataSource and then use that as a template which works well. I imagine that must work with shapes, buttons, labels as well. Since it sounds like you’ve been developing this since before 5.2 you might just import an earlier version as a module that has the colors you want…
One final little problem… I read on the 6 wiki that one can use either the name of the color, the hex name or the RGB ‘name’. The color and hex name work fine but I can’t seem to figure out the syntax for RGB. And I also can’t seem to see where in the ‘color chooser’ I can select a color and figure out the hex name. (Real nice job on the Servoy 6 wiki by the way Paul in highlighting the differences, problems, etc. in upgrading).
john.allen:
:oops:
Ouch. The ‘no color’ showing in 6 was indeed because I had somehow clicked the transparent option as Paul so excellently surmised. Thanks! I must have done it accidentally or possibly it happened in importing from 5.2 because I’ve never used that function… Not even sure how or for what purpose I would use it.
It took me a very long time to find out that the transparent property in Servoy Developer is somehow toggled by a Mac short cut, where you “always” by accident set or unset it. At the moment I just can’t remember the shortcut, something with -()-. Problem is you don’t usually realise the toggling quickly.
john.allen:
Still nice to know that the 5.2 color setting by RGB number is a bug so I haven’t completely lost it… There are of course work arounds for that problem if I don’t move that solution right away to 6. Robert you probably already have something like this but what I’m now doing in my case where I want most forms to have the same color is duplicate one of my forms that has the color I want, remove everything from it, have no dataSource and then use that as a template which works well. I imagine that must work with shapes, buttons, labels as well. Since it sounds like you’ve been developing this since before 5.2 you might just import an earlier version as a module that has the colors you want…
That’s true. Actually we started development on Servoy version 1.9 but adopted all the new possibilities. Seems a long time ago
john.allen:
One final little problem… I read on the 6 wiki that one can use either the name of the color, the hex name or the RGB ‘name’. The color and hex name work fine but I can’t seem to figure out the syntax for RGB. And I also can’t seem to see where in the ‘color chooser’ I can select a color and figure out the hex name. (Real nice job on the Servoy 6 wiki by the way Paul in highlighting the differences, problems, etc. in upgrading).
The default Mac Color Chooser doesn’t have a hex display. But you can get a nice little plug-in to put in the the /Library/ColorPickers/ folder. Get it here: http://wafflesoftware.net/hexpicker/