Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Border around disabled Text in Eclipse Form
Border around disabled Text in Eclipse Form [message #446711] Wed, 01 December 2004 10:07 Go to next message
Timur Shakirov is currently offline Timur ShakirovFriend
Messages: 3
Registered: July 2009
Junior Member
Hello,

I have a problem to get a border drawn about the disabled Text wigdet
within a subclass of the SectionPart. As long as the Text is enabled,
everithing is OK, but as soon as I disable this widget, the border will
not be drawn. Has anybody seen such a behavior before?

And what should I do to get the borders drawn around the disabled Text
widget?

Usage of functions Section.layout(); Section.redraw(); brings me nothing.
If I create Text using function FormToolkit.createText( Composite,
"SomeText", SWT.BORDER ) I get two borders around enabled Text, and this
in nor exactly what I want.

Some tech. info:
OS: W2K, Eclipse Platform v. 3.01, SWT v. 3.01

Thanks in advance,
Tim
Re: Border around disabled Text in Eclipse Form [message #446832 is a reply to message #446711] Fri, 03 December 2004 15:02 Go to previous messageGo to next message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
Please post a snippet that shows the problem and provide a screen shot.

"Timur Shakirov" <shakirov@epost.de> wrote in message
news:cok548$4pe$1@www.eclipse.org...
> Hello,
>
> I have a problem to get a border drawn about the disabled Text wigdet
> within a subclass of the SectionPart. As long as the Text is enabled,
> everithing is OK, but as soon as I disable this widget, the border will
> not be drawn. Has anybody seen such a behavior before?
>
> And what should I do to get the borders drawn around the disabled Text
> widget?
>
> Usage of functions Section.layout(); Section.redraw(); brings me nothing.
> If I create Text using function FormToolkit.createText( Composite,
> "SomeText", SWT.BORDER ) I get two borders around enabled Text, and this
> in nor exactly what I want.
>
> Some tech. info:
> OS: W2K, Eclipse Platform v. 3.01, SWT v. 3.01
>
> Thanks in advance,
> Tim
>
Re: Border around disabled Text in Eclipse Form [message #449353 is a reply to message #446832] Mon, 24 January 2005 04:14 Go to previous messageGo to next message
Andreas Martin is currently offline Andreas MartinFriend
Messages: 6
Registered: July 2009
Junior Member
Steve Northover wrote:
> Please post a snippet that shows the problem and provide a screen shot.
>
> "Timur Shakirov" <shakirov@epost.de> wrote in message
> news:cok548$4pe$1@www.eclipse.org...
>
>>Hello,
>>
>>I have a problem to get a border drawn about the disabled Text wigdet
>>within a subclass of the SectionPart. As long as the Text is enabled,
>>everithing is OK, but as soon as I disable this widget, the border will
>>not be drawn. Has anybody seen such a behavior before?
>>
>>And what should I do to get the borders drawn around the disabled Text
>>widget?
>>

Hello!

I have the same problem as described. I'm using Eclipse 3.1M4 with
Windows XP. I made a screenshot showing the error:
http://www.perfectwww.de/eigene/schmidt/win_classic_xp.png

On the left hand you see a disabled textbox with XP classic skin (I
think the same effect like in W2K without a border). On the other hand
you see the disabled textbox with correct border with the standard
modern XP skin.

I used the following composite inside an Eclipse Forms standalone
application:


public class DebugForm extends Composite {

private FormToolkit toolkit;

public DebugForm(Composite parent, FormToolkit toolkit, int style) {
super(parent, style);
this.toolkit = toolkit;
createContents(this);

}

public void createContents(Composite parent) {
GridLayout gridLayout = new GridLayout();
gridLayout.marginWidth = gridLayout.marginHeight = 5;

gridLayout.numColumns = 2;
parent.setLayout(gridLayout);

toolkit.paintBordersFor(parent);

(toolkit.createText(parent, "disabled", SWT.SINGLE)).setEnabled(false);
(toolkit.createText(parent, "enabled", SWT.SINGLE)).setEnabled(true);

}
}


Additionaly I found this bug report
https://bugs.eclipse.org/bugs/show_bug.cgi?id=67690 which describes a
similar behaviour.

Andreas Martin
Re: Border around disabled Text in Eclipse Form [message #449444 is a reply to message #449353] Mon, 24 January 2005 17:35 Go to previous message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
Looks like a bug on Eclipse forms. They run different code depending on
whether you are running with the XP manifest.

"Andreas Martin" <a.martin@perfectwww.de> wrote in message
news:ct1sm9$84r$1@www.eclipse.org...
> Steve Northover wrote:
> > Please post a snippet that shows the problem and provide a screen shot.
> >
> > "Timur Shakirov" <shakirov@epost.de> wrote in message
> > news:cok548$4pe$1@www.eclipse.org...
> >
> >>Hello,
> >>
> >>I have a problem to get a border drawn about the disabled Text wigdet
> >>within a subclass of the SectionPart. As long as the Text is enabled,
> >>everithing is OK, but as soon as I disable this widget, the border will
> >>not be drawn. Has anybody seen such a behavior before?
> >>
> >>And what should I do to get the borders drawn around the disabled Text
> >>widget?
> >>
>
> Hello!
>
> I have the same problem as described. I'm using Eclipse 3.1M4 with
> Windows XP. I made a screenshot showing the error:
> http://www.perfectwww.de/eigene/schmidt/win_classic_xp.png
>
> On the left hand you see a disabled textbox with XP classic skin (I
> think the same effect like in W2K without a border). On the other hand
> you see the disabled textbox with correct border with the standard
> modern XP skin.
>
> I used the following composite inside an Eclipse Forms standalone
> application:
>
>
> public class DebugForm extends Composite {
>
> private FormToolkit toolkit;
>
> public DebugForm(Composite parent, FormToolkit toolkit, int style) {
> super(parent, style);
> this.toolkit = toolkit;
> createContents(this);
>
> }
>
> public void createContents(Composite parent) {
> GridLayout gridLayout = new GridLayout();
> gridLayout.marginWidth = gridLayout.marginHeight = 5;
>
> gridLayout.numColumns = 2;
> parent.setLayout(gridLayout);
>
> toolkit.paintBordersFor(parent);
>
> (toolkit.createText(parent, "disabled", SWT.SINGLE)).setEnabled(false);
> (toolkit.createText(parent, "enabled", SWT.SINGLE)).setEnabled(true);
>
> }
> }
>
>
> Additionaly I found this bug report
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=67690 which describes a
> similar behaviour.
>
> Andreas Martin
Previous Topic:Virtual Table an BackgoringColor of Tableitem after refresh
Next Topic:Image adding in the coolbar
Goto Forum:
  


Current Time: Tue Nov 12 09:26:21 GMT 2019

Powered by FUDForum. Page generated in 0.02179 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top