0
私はこのウィジェットを作ってみる:そのために 2つの複合材の異なる要素をどのように揃えることができますか?
私はIDとパスワード
のために(1列との)グループに1つの複合と(ラベルとテキストのための)2列を持つ一つの複合を作成そして、3つのフィールドを持つ3つのフィールド(チェックボックス、ラベル、テキスト)のコンポジットを1つ作成します。
しかし、最後の行はIDとパスワードに揃っていません。 "Retry attempsテキストフィールド:
私のコードです:
Composite sqlComposite = new Composite(parent, SWT.NONE);
sqlComposite.setLayout(new GridLayout(1, false));
sqlComposite .setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
Group sqlGoup = new Group(sqlComposite, SWT.NONE);
group.setLayout(new GridLayout(1, false));
group.setText("sql connection");
Composite sql2Composite = new Composite(sqlGoup, SWT.NONE);
sql2Composite.setLayout(new GridLayout(2, false));
sql2Composite .setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
Label label = new Label(sql2Composite, SWT.NONE);
label.setText("Id");
Text textBoxID = new Text(sql2Composite, SWT.BORDER);
textBoxID.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
Label label = new Label(sql2Composite, SWT.NONE);
label.setText("Password");
Text textBoxPass = new Text(sql2Composite, SWT.BORDER);
textBoxPass.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
Composite sqlButtonsComposite = new Composite(sqlGoup, SWT.NONE);
sqlButtonsComposite.setLayout(new GridLayout(3, false));
sqlButtonsComposite.setLayoutData(new GridData(SWT.NONE, SWT.NONE, false, false));
_encryptCheckButton = new Button(sqlButtonsComposite, SWT.CHECK);
_encryptCheckButton.setText("Encrypt");
_encryptCheckButton.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, true, false));
Label labelSpinner = new Label(sqlButtonsComposite , SWT.NONE);
labelSpinner.setText("RetryAttempts");
_retryAttemptsSpinner = new Spinner(sqlButtonsComposite, SWT.BORDER);
_retryAttemptsSpinner.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, true, false));
_retryAttemptsSpinner.setMinimum(MIN_DELTA_SPINNER);
_retryAttemptsSpinner.setMaximum(MAX_DELTA_SPINNER);
_retryAttemptsSpinner.setSelection(DEFAULT_SPINNER_NUMBER);
_retryAttemptsSpinner.setIncrement(INCREMENT_SPINNER_NUMBER);
だから私の質問は次のとおりです。どのように私は、ID、パスワード、およびチェックボックスという名前の暗号化を揃えることができますか?
おかげ
を変更する必要がある場所の上、コメントを追加しています!私は今問題を理解している – Bob