Solved

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

Posted on 2013-06-18
1
417 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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
pairstar challenge 2 42
nestparen challenge 4 57
wordappend challenge 8 86
PDFBox - convert image to PDF, PDF resolution 3 70
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
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…

762 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now