This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
When using the style dialog to change the background color for a text field, text area, list box or drop down list basic visual web component, the new background color does not fill within the component. Instead, the new background color appears as a narrow, vertical stripe along the right, outer edge of the component when viewed in the visual editor.
It sounds like a problem of the component or transparency of the inner field. I am going to check it first.
It seems the sizes of the line boxes (because of the enclosing span are not computed correctly).
That the designer still has this residual effect should not be p1. This is more of a Woodstock issue. The background color of certain components cannot be automatically inlined -- the css class itself needs to be overwritten. Add e.g. .TxtFld_sun4 {background-color: purple;} in the stylesheet.css to change the default background color of the woodstock textfield. Refresh designer to see background color changed as intended.
I found the cause, it is because of implementation of the FormComponentBox, hacking the content size in respect to the border size. Going to adjust to this hack, but need to check whether it won't cause other problem. If it does, the fix it would need to be reconsidered (depending on which problem is bigger).
Fixed. (It is adjustment to existing hack) Checking in visualweb/designer/src/org/netbeans/modules/visualweb/css2/ContainerBox.java; /cvs/visualweb/designer/src/org/netbeans/modules/visualweb/css2/ContainerBox.java,v <-- ContainerBox.java new revision: 1.26; previous revision: 1.25 done Checking in visualweb/designer/src/org/netbeans/modules/visualweb/css2/CssBox.java; /cvs/visualweb/designer/src/org/netbeans/modules/visualweb/css2/CssBox.java,v <-- CssBox.java new revision: 1.32; previous revision: 1.31 done
Although the current fix in 6.1 trunk line build NetBeans IDE Dev (Build 200801081200) removes now the artifact narrow vertical stripe as a result of applying an inline style e.g. the textfield, attempting to set the style via styleclass is now broken for runtime: it only works at designtime and preview, regardless if inline style for background-color is set as well. Prior to this fix, overwriting via the styleclass as in desc4 worked correctly in designer/preview/runtime. This fix should be backed out. I think the previous behavior which had a workaround could be considered a P2/P3.
Krys, could you please, provide a case which was working before and now it is not? I didn't get what has changed to worse, changing the background of the textfield component via its style was before not working either (because of that span). This fix shouldn't affect the runtime at all.
My mistake. I failed to include background-image:none in my test to the styleclass overwrite. The workaround's proper code is: e.g. .TxtFld_sun4 {background-image:none; background-color: green;} Your fix works to remove artifact as user reported. Essentially using the "style" property is a no-op, it no longer produces any residual color. User needs to overwrite class as shown.
Verified in NetBeans IDE Dev (Build 200801081200) Java: 1.6.0_04; Java HotSpot(TM) Client VM 10.0-b19 System: Windows XP version 5.1 running on x86;