[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [platform-swt-dev] RE: HOW to remove title bar of SWT Shell afte creation
|
Well I think the solution can be really simple. You put all your
controls in a composite and simply reparent this composite to a newly
open shell, when the user want's to see things in fullscreen mode.
----------------8<----------------
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
public class TestShell {
public static void main(String[] args) {
final Display display = new Display ();
final Shell shell = new Shell(display);
shell.setLayout(new FillLayout());
final Composite comp = new Composite(shell,SWT.NONE);
comp.setLayout(new FillLayout());
Label l = new Label(comp,SWT.NONE);
l.setText("HALLLO");
Button b = new Button(comp,SWT.PUSH);
b.setText("Copy to new shell");
b.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
Shell s = new Shell(display,SWT.NO_TRIM);
s.setLayout(new FillLayout());
s.setMaximized(true);
comp.setParent(s);
s.open();
shell.setVisible(false);
}
});
shell.open ();
while (!shell.isDisposed ()) {
if (!display.readAndDispatch ()) display.sleep ();
}
display.dispose ();
}
}
----------------8<----------------
Tom
Steve Northover schrieb:
>
> Really? In .NET, they are running on Windows only and Windows lets you
> change the shell trim after creation. I have no idea about Swing. Try
> hiding the shell title after the window has been displayed.
>
>
>
> *"Kumar, Saurav" <saurav.kumar@xxxxxxxxx>*
> Sent by: platform-swt-dev-bounces@xxxxxxxxxxx
>
> 01/30/2007 01:52 AM
> Please respond to
> "Eclipse Platform SWT component developers list."
> <platform-swt-dev@xxxxxxxxxxx>
>
>
> To
> <platform-swt-dev@xxxxxxxxxxx> cc
>
> Subject
> [platform-swt-dev] RE: HOW to remove title bar of SWT Shell afte
> creation
>
>
>
>
>
>
>
>
> Hello Steve,
> Can you give some idea on it? I want to use a button for maximize my
> application in so that it should not display anything except the top
> widget (composite) on top of shell. For the same I tried to hide the
> shell title as we can do it in Swing or .NET. But in SWT we are not
> having API for it.
> Shell can be top less only at construction time.
>
> Any ideas by which I can make maximize function operational?
>
>
> With Best Regards,
> Saurav
>
>
> -----Original Message-----
> From: platform-swt-dev-bounces@xxxxxxxxxxx
> [mailto:platform-swt-dev-bounces@xxxxxxxxxxx] On Behalf Of
> platform-swt-dev-request@xxxxxxxxxxx
> Sent: Monday, January 29, 2007 10:22 PM
> To: platform-swt-dev@xxxxxxxxxxx
> Subject: platform-swt-dev Digest, Vol 23, Issue 11
>
> Send platform-swt-dev mailing list submissions to
> platform-swt-dev@xxxxxxxxxxx
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://dev.eclipse.org/mailman/listinfo/platform-swt-dev
> or, via email, send a message with subject or body 'help' to
> platform-swt-dev-request@xxxxxxxxxxx
>
> You can reach the person managing the list at
> platform-swt-dev-owner@xxxxxxxxxxx
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of platform-swt-dev digest..."
>
>
> Today's Topics:
>
> 1. Re: Commit Rights for Kevin Barnes (Mike Wilson)
> 2. Re: Commit Rights for Kevin Barnes (Carolyn MacLeod)
> 3. Re: RE: HOW to remove title bar of SWT Shell after
> creation
> of Shell (Steve Northover)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Mon, 29 Jan 2007 09:59:51 -0500
> From: Mike Wilson <Mike_Wilson@xxxxxxxxxx> Subject: Re: [platform-swt-dev] Commit Rights for Kevin Barnes
> To: "Eclipse Platform SWT component developers list."
> <platform-swt-dev@xxxxxxxxxxx> Cc: platform-swt-dev <platform-swt-dev@xxxxxxxxxxx>,
> platform-swt-dev-bounces@xxxxxxxxxxx
> Message-ID:
>
> <OFF7CF9CDB.81015CA9-ON85257272.00526368-85257272.0052677B@xxxxxxxxxx> Content-Type: text/plain; charset="us-ascii"
>
> +1.
>
> McQ.
>
>
>
>
> Felipe Heidrich/Ottawa/IBM@IBMCA
> Sent by: platform-swt-dev-bounces@xxxxxxxxxxx
> 01/26/07 18:32
> Please respond to
> "Eclipse Platform SWT component developers list."
>
>
> To
> platform-swt-dev <platform-swt-dev@xxxxxxxxxxx> cc
>
> Subject
> [platform-swt-dev] Commit Rights for Kevin Barnes
>
>
>
>
>
>
> I would like to nominate Kevin Barnes to become an SWT committer.
>
> Anyone else?
>
> +1
>
> Felipe
> _______________________________________________
> platform-swt-dev mailing list
> platform-swt-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/platform-swt-dev
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> https://dev.eclipse.org/mailman/listinfo/platform-swt-dev/attachments/20
> 070129/72e57999/attachment.html
>
> ------------------------------
>
> Message: 2
> Date: Mon, 29 Jan 2007 10:18:38 -0500
> From: Carolyn MacLeod <Carolyn_MacLeod@xxxxxxxxxx> Subject: Re: [platform-swt-dev] Commit Rights for Kevin Barnes
> To: "Eclipse Platform SWT component developers list."
> <platform-swt-dev@xxxxxxxxxxx> Message-ID:
>
> <OFFB6EE004.FA89CA82-ON85257272.00509369-85257272.00541A12@xxxxxxxxxx> Content-Type: text/plain; charset="us-ascii"
>
> +1
>
> Kevin was instrumental in making sure that SWT worked well on Vista, and
>
> he has been making SWT contributions daily for over 6 months now.
>
> Carolyn
>
>
>
>
> Felipe Heidrich/Ottawa/IBM@IBMCA
> Sent by: platform-swt-dev-bounces@xxxxxxxxxxx
> 01/26/2007 06:32 PM
> Please respond to
> "Eclipse Platform SWT component developers list."
> <platform-swt-dev@xxxxxxxxxxx>
>
> To
> platform-swt-dev <platform-swt-dev@xxxxxxxxxxx> cc
>
> Subject
> [platform-swt-dev] Commit Rights for Kevin Barnes
>
>
>
>
>
>
> I would like to nominate Kevin Barnes to become an SWT committer.
>
> Anyone else?
>
> +1
>
> Felipe
> _______________________________________________
> platform-swt-dev mailing list
> platform-swt-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/platform-swt-dev
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> https://dev.eclipse.org/mailman/listinfo/platform-swt-dev/attachments/20
> 070129/38ef4c0b/attachment.html
>
> ------------------------------
>
> Message: 3
> Date: Mon, 29 Jan 2007 11:51:28 -0500
> From: Steve Northover <Steve_Northover@xxxxxxxxxx> Subject: Re: [platform-swt-dev] RE: HOW to remove title bar of SWT
> Shell after creation of Shell
> To: "Eclipse Platform SWT component developers list."
> <platform-swt-dev@xxxxxxxxxxx> Message-ID:
>
> <OF4FAD87F1.BC183517-ON85257272.005C73C8-85257272.005C9A4A@xxxxxxxxxx> Content-Type: text/plain; charset="us-ascii"
>
> Platforms that have a Window manager such as Linux don't let you change
> the trim after a window has been created. It's not an SWT limitation.
> Every application that runs on those platforms has this problem.
>
>
>
>
> "Daniel Spiewak" <djspiewak@xxxxxxxxx> Sent by: platform-swt-dev-bounces@xxxxxxxxxxx
> 01/29/2007 12:23 AM
> Please respond to
> "Eclipse Platform SWT component developers list."
> <platform-swt-dev@xxxxxxxxxxx>
>
> To
> "Eclipse Platform SWT component developers list."
> <platform-swt-dev@xxxxxxxxxxx> cc
>
> Subject
> Re: [platform-swt-dev] RE: HOW to remove title bar of SWT Shell after
> creation of Shell
>
>
>
>
>
>
> Well, your question probably should have been asked on the
> eclipse.platform.swt newsgroup since it's really usage related. People
> who monitor this mailing list aren't really on the lookout for usage
> questions, so a lot go unanswered...
>
> The short answer to your question is: no. The long answer to your
> question is: well, no. Once a shell (or any control for that matter) is
>
> created, you cannot change its style bits. You have two options as I
> see
> them. First: create the shell NO_TRIM to begin with and emulate the
> trim
> until you no longer need it. Otherwise: create two shells and reparent
> a
> content composite from one to the other. This is a pretty bad solution,
>
> but if you're desperate... I suppose, there is a third option, which
> would be find a way to avoid needing a shell which starts trimmed and
> becomes trimless. :-)
>
> Daniel
>
> On 1/28/07, Kumar, Saurav <saurav.kumar@xxxxxxxxx > wrote:
>
> Why not anybody accepting my request? Is there some rule like committer
> can only raise the questions or my question so stupid that..
>
> Reply soon
> Saurav
>
>
> -----Original Message-----
> From: platform-swt-dev-bounces@xxxxxxxxxxx
> [mailto:platform-swt-dev-bounces@xxxxxxxxxxx] On Behalf Of
> platform-swt-dev-request@xxxxxxxxxxx
> Sent: Thursday, January 25, 2007 10:30 PM
> To: platform-swt-dev@xxxxxxxxxxx
> Subject: platform-swt-dev Digest, Vol 23, Issue 7
>
> Send platform-swt-dev mailing list submissions to
> platform-swt-dev@xxxxxxxxxxx
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://dev.eclipse.org/mailman/listinfo/platform-swt-dev
> or, via email, send a message with subject or body 'help' to
> platform-swt-dev-request@xxxxxxxxxxx
>
> You can reach the person managing the list at
> platform-swt-dev-owner@xxxxxxxxxxx
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of platform-swt-dev digest..."
>
>
> Today's Topics:
>
> 1. How to remove title bar of SWT Shell after creation of
> Shell
> (Kumar, Saurav)
> 2. New DateTime Widget (Dave Smith)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 25 Jan 2007 12:47:22 +0530
> From: "Kumar, Saurav" < saurav.kumar@xxxxxxxxx> Subject: [platform-swt-dev] How to remove title bar of SWT Shell after
> creation of Shell
> To: < platform-swt-dev@xxxxxxxxxxx > Message-ID:
> <CE652BC92C01E645A7AD3BCEF5CDD86BF3E983@xxxxxxxxxxxxxxxxxx > Content-Type: text/plain; charset="us-ascii"
>
>
>
> Dear All,
>
>
>
> If I create shell with this style
>
> final Shell shell2 = new Shell(SWT.RESIZE);
>
>
>
> I get intended shell.
>
>
>
> But I want to remove title bar (as it is appearing with SWT.RESIZE) of
> already created shell then ?
>
>
>
> I am not able to find any way to do so.
>
>
>
> Another alternative is
>
> Can I create new shell with this style and transfer all the contents of
> old one to new shell ?
>
>
>
> Please reply
>
>
>
>
>
> With Best Regards,
>
> Saurav
>
>
>
>
>
> DISCLAIMER:
> Unless indicated otherwise, the information contained in this message is
> privileged and confidential, and is intended only for the use of the
> addressee(s) named above and others who have been specifically
> authorized to receive it. If you are not the intended recipient, you are
> hereby notified that any dissemination, distribution or copying of this
> message and/or attachments is strictly prohibited. The company accepts
> no liability for any damage caused by any virus transmitted by this
> email. Furthermore, the company does not warrant a proper and complete
> transmission of this information, nor does it accept liability for any
> delays. If you have received this message in error, please contact the
> sender and delete the message. Thank you.
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> https://dev.eclipse.org/mailman/listinfo/platform-swt-dev/attachments/20
>
> 070125/e6e67edc/attachment.html
>
> ------------------------------
>
> Message: 2
> Date: Thu, 25 Jan 2007 10:26:21 -0500
> From: Dave Smith < dave.smith@xxxxxxxxxxx> Subject: [platform-swt-dev] New DateTime Widget
> To: platform-swt-dev@xxxxxxxxxxx
> Message-ID: < 1169738781.16229.4.camel@xxxxxxxxxxxxxxxxxxx> Content-Type: text/plain
>
> I have a couple of requests.
>
> 1. Can we add an ISO date format? YYYY/MM/DD
> 2. If we are using an ISO date format can we have a Century default? In
> our custom DateTime Widget the first two digits are filled in (20) and
> the user is started at the 3rd. position.
> 3. Can we set and retrieve the date out of the widget using a standard
> java.util.Date or java.util.Calendar ?
> 4. How does the user pop down the calendar selection?
>
> --
> Dave Smith
> CANdata Systems Ltd
> 416-493-9020
>
>
>
> ------------------------------
>
> _______________________________________________
> platform-swt-dev mailing list
> platform-swt-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/platform-swt-dev
>
>
> End of platform-swt-dev Digest, Vol 23, Issue 7
> ***********************************************
>
>
>
> DISCLAIMER:
> Unless indicated otherwise, the information contained in this message is
>
> privileged and confidential, and is intended only for the use of the
> addressee(s) named above and others who have been specifically
> authorized
> to receive it. If you are not the intended recipient, you are hereby
> notified that any dissemination, distribution or copying of this message
>
> and/or attachments is strictly prohibited. The company accepts no
> liability for any damage caused by any virus transmitted by this email.
> Furthermore, the company does not warrant a proper and complete
> transmission of this information, nor does it accept liability for any
> delays. If you have received this message in error, please contact the
> sender and delete the message. Thank you.
> _______________________________________________
> platform-swt-dev mailing list
> platform-swt-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/platform-swt-dev
> _______________________________________________
> platform-swt-dev mailing list
> platform-swt-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/platform-swt-dev
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> https://dev.eclipse.org/mailman/listinfo/platform-swt-dev/attachments/20
> 070129/f582a9d7/attachment.html
>
> ------------------------------
>
> _______________________________________________
> platform-swt-dev mailing list
> platform-swt-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/platform-swt-dev
>
>
> End of platform-swt-dev Digest, Vol 23, Issue 11
> ************************************************
>
>
>
> DISCLAIMER:
> Unless indicated otherwise, the information contained in this message is
> privileged and confidential, and is intended only for the use of the
> addressee(s) named above and others who have been specifically
> authorized to receive it. If you are not the intended recipient, you are
> hereby notified that any dissemination, distribution or copying of this
> message and/or attachments is strictly prohibited. The company accepts
> no liability for any damage caused by any virus transmitted by this
> email. Furthermore, the company does not warrant a proper and complete
> transmission of this information, nor does it accept liability for any
> delays. If you have received this message in error, please contact the
> sender and delete the message. Thank you.
> _______________________________________________
> platform-swt-dev mailing list
> platform-swt-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/platform-swt-dev
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> platform-swt-dev mailing list
> platform-swt-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/platform-swt-dev
--
B e s t S o l u t i o n . a t EDV Systemhaus GmbH
------------------------------------------------------------------------
tom schindl leiter softwareentwicklung/CSE mobile ++43 676 3232147
------------------------------------------------------------------------
eduard-bodem-gasse 8/3 A-6020 innsbruck fax ++43 512 935833
http://www.bestsolution.at phone ++43 512 935834
Attachment:
signature.asc
Description: OpenPGP digital signature