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.

Bug 124104 - Text Field and List Box Components
Summary: Text Field and List Box Components
Status: VERIFIED FIXED
Alias: None
Product: obsolete
Classification: Unclassified
Component: visualweb (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: Peter Zavadsky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-17 03:11 UTC by jglaser2
Modified: 2008-01-09 02:46 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jglaser2 2007-12-17 03:11:29 UTC
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.
Comment 1 Peter Zavadsky 2008-01-02 18:18:49 UTC
It sounds like a problem of the component or transparency of the inner field. I am going to check it first.
Comment 2 Peter Zavadsky 2008-01-02 19:29:18 UTC
It seems the sizes of the line boxes (because of the enclosing span are not computed correctly).
Comment 3 _ krystyna 2008-01-07 22:10:41 UTC
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.

Comment 4 Peter Zavadsky 2008-01-08 01:02:25 UTC
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).
Comment 5 Peter Zavadsky 2008-01-08 01:25:59 UTC
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
Comment 6 _ krystyna 2008-01-09 00:25:25 UTC
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.
Comment 7 Peter Zavadsky 2008-01-09 00:50:17 UTC
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.
Comment 8 _ krystyna 2008-01-09 02:46:25 UTC
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.
Comment 9 _ krystyna 2008-01-09 02:46:52 UTC
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;