Skip to content

Instantly share code, notes, and snippets.

@darthdeus
Forked from kattrali/non_modal.rb
Created December 23, 2010 21:30
Show Gist options
  • Save darthdeus/753566 to your computer and use it in GitHub Desktop.
Save darthdeus/753566 to your computer and use it in GitHub Desktop.
composite = Swt::Widgets::Shell.new(Redcar::ApplicationSWT.display, Swt::SWT::MODELESS)
layout = Swt::Layout::RowLayout.new(Swt::SWT::VERTICAL)
composite.setLayout(layout)
text = Swt::Widgets::Text.new(composite, Swt::SWT::SINGLE | Swt::SWT::LEFT | Swt::SWT::ICON_CANCEL)
text.set_layout_data(Swt::Layout::RowData.new(400, 20))
list = Swt::Widgets::List.new(composite, Swt::SWT::V_SCROLL | Swt::SWT::H_SCROLL | Swt::SWT::SINGLE)
list.set_layout_data(Swt::Layout::RowData.new(400, 200))
composite.set_size(420,280)
composite.open
x, y = Redcar.gui.dialog_adapter.send(:get_coordinates, :cursor)
composite.set_location(x,y)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment