Solved

How to add a text box in a GUI by uisng SWT package?

Posted on 2013-06-18
1
421 Views
Last Modified: 2013-06-19
Hi,
I have GUI that I am creating using SWT package.

The GUI has a toolbar and under the toolbar, I would like to add a text box where I can type.

How can I add this text box in my GUI using SWT package?

I am sending a screen shot in the attachment and I marked the textbox area in red.
text-box.png
0
Comment
Question by:Tolgar
1 Comment
 
LVL 16

Accepted Solution

by:
Valeri earned 500 total points
ID: 39258014
right after the horizontal line under the whole tool bar add these lines:
GridData txtGridData = new GridData(GridData.FILL_BOTH); txtGridData.horizontalSpan = 2;
        Text txt = new Text(compTab1, SWT.MULTI | SWT.BORDER | SWT.WRAP | SWT.V_SCROLL);
        txt.setLayoutData(txtGridData);
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question