Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Rectangle/column selection in StyledText or any other SWT compatible text field
Rectangle/column selection in StyledText or any other SWT compatible text field [message #458413] Wed, 13 July 2005 07:47 Go to next message
Eclipse UserFriend
Originally posted by: cyberfloetz.web.de

Hi,

I'm searching for a solution to select columns inside a SWT text field. Does
anybody know how to do that?

You don't understand what I mean? --> Normally when you select some lines of
text the selection starts at the cursors X position left-top, selects the
rest of the line, the next lines and then ends at the cursor X position
right-bottom. But I'm searching for a rectangle selection/column selection.
Only the text between left-top position and the right-button selection shall
be selected and not the "rest/beginning" of the line. In M!cro$oft W0rd you
can do this by holding the "Alt" key when selecting the text.

Example: (text block letters: o; selected letters: 0)

Normal selection:

ooooooooooooooo
oooo00000000000
000000000000000
00000000ooooooo
ooooooooooooooo

What I search for:

ooooooooooooooo
oooo0000ooooooo
oooo0000ooooooo
oooo0000ooooooo
ooooooooooooooo

I know that this can be very difficult if you have to handle text with
non-monospaced fonts. But monospaced fonts would be enough. I also tried to
deactivate normal selection mode and put a graphical layer over it which
handels selection in a graphical way, but I didn't find a solution how to
create a layered SWT-Composite with Draw and SWT components inside...is that
possible in any way???

Thanks a lot an sorry for the bad english *blush*,

Andreas
Re: Rectangle/column selection in StyledText or any other SWT compatible text field [message #458525 is a reply to message #458413] Thu, 14 July 2005 14:24 Go to previous messageGo to next message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
You won't be able to do this with either the native Text control or
StyledText. The operating systems don't support it.

"cyberfloetz" <cyberfloetz@web.de> wrote in message
news:db2gus$hh9$1@news.eclipse.org...
> Hi,
>
> I'm searching for a solution to select columns inside a SWT text field.
Does
> anybody know how to do that?
>
> You don't understand what I mean? --> Normally when you select some lines
of
> text the selection starts at the cursors X position left-top, selects the
> rest of the line, the next lines and then ends at the cursor X position
> right-bottom. But I'm searching for a rectangle selection/column
selection.
> Only the text between left-top position and the right-button selection
shall
> be selected and not the "rest/beginning" of the line. In M!cro$oft W0rd
you
> can do this by holding the "Alt" key when selecting the text.
>
> Example: (text block letters: o; selected letters: 0)
>
> Normal selection:
>
> ooooooooooooooo
> oooo00000000000
> 000000000000000
> 00000000ooooooo
> ooooooooooooooo
>
> What I search for:
>
> ooooooooooooooo
> oooo0000ooooooo
> oooo0000ooooooo
> oooo0000ooooooo
> ooooooooooooooo
>
> I know that this can be very difficult if you have to handle text with
> non-monospaced fonts. But monospaced fonts would be enough. I also tried
to
> deactivate normal selection mode and put a graphical layer over it which
> handels selection in a graphical way, but I didn't find a solution how to
> create a layered SWT-Composite with Draw and SWT components inside...is
that
> possible in any way???
>
> Thanks a lot an sorry for the bad english *blush*,
>
> Andreas
>
>
>
>
>
Re: Rectangle/column selection in StyledText or any other SWT compatible text field [message #458989 is a reply to message #458413] Thu, 28 July 2005 13:36 Go to previous message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
You may wish to CC yourself to
https://bugs.eclipse.org/bugs/show_bug.cgi?id=8521 .

"cyberfloetz" <cyberfloetz@web.de> wrote in message
news:db2gus$hh9$1@news.eclipse.org...
> Hi,
>
> I'm searching for a solution to select columns inside a SWT text field.
Does
> anybody know how to do that?
>
> You don't understand what I mean? --> Normally when you select some lines
of
> text the selection starts at the cursors X position left-top, selects the
> rest of the line, the next lines and then ends at the cursor X position
> right-bottom. But I'm searching for a rectangle selection/column
selection.
> Only the text between left-top position and the right-button selection
shall
> be selected and not the "rest/beginning" of the line. In M!cro$oft W0rd
you
> can do this by holding the "Alt" key when selecting the text.
>
> Example: (text block letters: o; selected letters: 0)
>
> Normal selection:
>
> ooooooooooooooo
> oooo00000000000
> 000000000000000
> 00000000ooooooo
> ooooooooooooooo
>
> What I search for:
>
> ooooooooooooooo
> oooo0000ooooooo
> oooo0000ooooooo
> oooo0000ooooooo
> ooooooooooooooo
>
> I know that this can be very difficult if you have to handle text with
> non-monospaced fonts. But monospaced fonts would be enough. I also tried
to
> deactivate normal selection mode and put a graphical layer over it which
> handels selection in a graphical way, but I didn't find a solution how to
> create a layered SWT-Composite with Draw and SWT components inside...is
that
> possible in any way???
>
> Thanks a lot an sorry for the bad english *blush*,
>
> Andreas
>
>
>
>
>
Previous Topic:Help with ComboBoxCellEditor in TableTreeViewer
Next Topic:how to handle treeviewer before expand happened ?
Goto Forum:
  


Current Time: Mon Oct 19 16:10:13 GMT 2020

Powered by FUDForum. Page generated in 0.01593 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top