Jump to content
Forumu Destekleyenlere Katılın ×
Paticik Forumları
2000 lerden beri faal olan, çok şukela bir paylaşım platformuyuz. Hoşgeldiniz.

Java SWT scrolledcomposite sorunu


WaNTeD

Öne çıkan mesajlar

layout da scrolledcomposite mouse wheel ile scroll olmuyor, macosx te sorun yok, ama windowsta mouse wheel çalışmıyor, sanki z-index -1 verilmiş focuslanmıyor gibi.

yapı şu

örnek olarak 0 'dan, bu da windowsta mouse wheel ile scroll edilmiyor. nedir acaba sorun,


shell = new Shell();
shell.setSize(450, 300);
shell.setText("SWT Application");
shell.setLayout(new FormLayout());

Composite composite = new Composite(shell, SWT.NONE);
composite.setBackground(SWTResourceManager.getColor(SWT.COLOR_YELLOW));
FormData fd_composite = new FormData();
fd_composite.bottom = new FormAttachment(0, 46);
fd_composite.right = new FormAttachment(100);
fd_composite.top = new FormAttachment(0);
fd_composite.left = new FormAttachment(0);
composite.setLayoutData(fd_composite);
composite.setLayout(new FillLayout(SWT.HORIZONTAL));

Composite composite_1 = new Composite(shell, SWT.NONE);
FormData fd_composite_1 = new FormData();
fd_composite_1.right = new FormAttachment(0, 100);
fd_composite_1.top = new FormAttachment(composite, 1);
fd_composite_1.left = new FormAttachment(0);
fd_composite_1.bottom = new FormAttachment(100);
composite_1.setLayoutData(fd_composite_1);

Composite composite_2 = new Composite(shell, SWT.NONE);
composite_2.setLayout(new FillLayout(SWT.HORIZONTAL));
FormData fd_composite_2 = new FormData();
fd_composite_2.top = new FormAttachment(composite, 1);
fd_composite_2.left = new FormAttachment(composite_1, 1);
fd_composite_2.bottom = new FormAttachment(100);
fd_composite_2.right = new FormAttachment(100);
composite_2.setLayoutData(fd_composite_2);

ScrolledComposite scrolledComposite = new ScrolledComposite(composite_2, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
scrolledComposite.setBackground(SWTResourceManager.getColor(SWT.COLOR_DARK_RED));
scrolledComposite.setExpandHorizontal(true);
scrolledComposite.setExpandVertical(true);

Composite composite_3 = new Composite(scrolledComposite, SWT.NONE);
composite_3.setLayout(new GridLayout(1, false));

Composite composite_4 = new Composite(composite_3, SWT.NONE);
composite_4.setBackground(SWTResourceManager.getColor(SWT.COLOR_BLUE));

Composite composite_5 = new Composite(composite_3, SWT.NONE);
composite_5.setBackground(SWTResourceManager.getColor(SWT.COLOR_MAGENTA));

Composite composite_7 = new Composite(composite_3, SWT.NONE);
composite_7.setBackground(SWTResourceManager.getColor(SWT.COLOR_DARK_BLUE));

Composite composite_6 = new Composite(composite_3, SWT.NONE);
scrolledComposite.setContent(composite_3);
scrolledComposite.setMinSize(composite_3.computeSize(SWT.DEFAULT, SWT.DEFAULT));
Link to comment
Sosyal ağlarda paylaş

×
×
  • Yeni Oluştur...