Table: prevent packing by user

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Table: prevent packing by user

Thomas Singer
Hi,

Usually, when double-click at the end of a table column's header (e.g.
between 2 neighboring column headers) the user can trigger a packing of
the column (making it wide enough to fit the cell content). But how to
prevent that though keeping the moving and manually resizing of the column?

--
Best regards,
Thomas Singer
=============
syntevo GmbH
http://www.syntevo.com
http://www.syntevo.com/blog
_______________________________________________
platform-swt-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev
Reply | Threaded
Open this post in threaded view
|

Re: Table: prevent packing by user

Leo Ufimtsev-2
I don't think there is a direct api for this(But I haven't looked into Tree widget in a while, maybe there is..), as this is probably done by the native control itself as oppose to SWT layer.

The only thing I can think of is maybe get the size of the column on the first click and on the double click force the size of the column to be of size it was when you first clicked on it.

This is the first time I've heared such a request before. What's the use case for preventing columns from being packed btw? (just curious..)


On Fri, Oct 6, 2017 at 2:18 AM, Thomas Singer <[hidden email]> wrote:
Hi,

Usually, when double-click at the end of a table column's header (e.g. between 2 neighboring column headers) the user can trigger a packing of the column (making it wide enough to fit the cell content). But how to prevent that though keeping the moving and manually resizing of the column?

--
Best regards,
Thomas Singer
=============
syntevo GmbH
http://www.syntevo.com
http://www.syntevo.com/blog
_______________________________________________
platform-swt-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev



--
Leo Ufimtsev, Software Engineer, Red Hat

_______________________________________________
platform-swt-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev
Reply | Threaded
Open this post in threaded view
|

Re: Table: prevent packing by user

Laurent Caron-5
Hi thomas,

I don't think it's possible. TableColumn does not respond to a MouseDoubleClick event. When you double-click on a table header separator, 2 "resize" events are fired.
And when a user resizes a column, many "resize" events are fired in a short time, so you can not detect the double click by computing the time between 2 resize events :(

Laurent


2017-10-06 21:37 GMT+02:00 Leo Ufimtsev <[hidden email]>:
I don't think there is a direct api for this(But I haven't looked into Tree widget in a while, maybe there is..), as this is probably done by the native control itself as oppose to SWT layer.

The only thing I can think of is maybe get the size of the column on the first click and on the double click force the size of the column to be of size it was when you first clicked on it.

This is the first time I've heared such a request before. What's the use case for preventing columns from being packed btw? (just curious..)


On Fri, Oct 6, 2017 at 2:18 AM, Thomas Singer <[hidden email]> wrote:
Hi,

Usually, when double-click at the end of a table column's header (e.g. between 2 neighboring column headers) the user can trigger a packing of the column (making it wide enough to fit the cell content). But how to prevent that though keeping the moving and manually resizing of the column?

--
Best regards,
Thomas Singer
=============
syntevo GmbH
http://www.syntevo.com
http://www.syntevo.com/blog
_______________________________________________
platform-swt-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev



--
Leo Ufimtsev, Software Engineer, Red Hat

_______________________________________________
platform-swt-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev


_______________________________________________
platform-swt-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev
Reply | Threaded
Open this post in threaded view
|

Re: Table: prevent packing by user

Thomas Singer
In reply to this post by Leo Ufimtsev-2
Hi Leo,

Currently, in SmartGit we display the commit messages truncated after x
characters. This is sub-optimal. We want to display as much message as
the column width allows, but since the messages can become very long, we
don't want the column to become excessively wide.

--
Best regards,
Thomas Singer
=============
syntevo GmbH
http://www.syntevo.com
http://www.syntevo.com/blog


On 06.10.2017 21:37, Leo Ufimtsev wrote:

> I don't think there is a direct api for this(But I haven't looked into Tree
> widget in a while, maybe there is..), as this is probably done by the
> native control itself as oppose to SWT layer.
>
> The only thing I can think of is maybe get the size of the column on the
> first click and on the double click force the size of the column to be of
> size it was when you first clicked on it.
>
> This is the first time I've heared such a request before. What's the use
> case for preventing columns from being packed btw? (just curious..)
>
>
> On Fri, Oct 6, 2017 at 2:18 AM, Thomas Singer <[hidden email]> wrote:
>
>> Hi,
>>
>> Usually, when double-click at the end of a table column's header (e.g.
>> between 2 neighboring column headers) the user can trigger a packing of the
>> column (making it wide enough to fit the cell content). But how to prevent
>> that though keeping the moving and manually resizing of the column?
>>
>> --
>> Best regards,
>> Thomas Singer
>> =============
>> syntevo GmbH
>> http://www.syntevo.com
>> http://www.syntevo.com/blog
>> _______________________________________________
>> platform-swt-dev mailing list
>> [hidden email]
>> To change your delivery options, retrieve your password, or unsubscribe
>> from this list, visit
>> https://dev.eclipse.org/mailman/listinfo/platform-swt-dev
>>
>
>
>
>
>
> _______________________________________________
> platform-swt-dev mailing list
> [hidden email]
> To change your delivery options, retrieve your password, or unsubscribe from this list, visit
> https://dev.eclipse.org/mailman/listinfo/platform-swt-dev
>
_______________________________________________
platform-swt-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev
Reply | Threaded
Open this post in threaded view
|

Re: Table: prevent packing by user

Leo Ufimtsev-2


On Sat, Oct 7, 2017 at 10:10 AM, Thomas Singer <[hidden email]> wrote:
Hi Leo,

Currently, in SmartGit we display the commit messages truncated after x characters. This is sub-optimal. We want to display as much message as the column width allows, but since the messages can become very long, we don't want the column to become excessively wide.


How about truncating the log message that is put into the table/tree (My log messag.....) , and instead allow user to double click on the row to show more info in a popup. This would sort of prevent very very long rows. Or populate full text in some text control underneath the tree widget etc...


 
--
Best regards,
Thomas Singer
=============
syntevo GmbH
http://www.syntevo.com
http://www.syntevo.com/blog


On 06.10.2017 21:37, Leo Ufimtsev wrote:
I don't think there is a direct api for this(But I haven't looked into Tree
widget in a while, maybe there is..), as this is probably done by the
native control itself as oppose to SWT layer.

The only thing I can think of is maybe get the size of the column on the
first click and on the double click force the size of the column to be of
size it was when you first clicked on it.

This is the first time I've heared such a request before. What's the use
case for preventing columns from being packed btw? (just curious..)


On Fri, Oct 6, 2017 at 2:18 AM, Thomas Singer <[hidden email]> wrote:

Hi,

Usually, when double-click at the end of a table column's header (e.g.
between 2 neighboring column headers) the user can trigger a packing of the
column (making it wide enough to fit the cell content). But how to prevent
that though keeping the moving and manually resizing of the column?

--
Best regards,
Thomas Singer
=============
syntevo GmbH
http://www.syntevo.com
http://www.syntevo.com/blog
_______________________________________________
platform-swt-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe
from this list, visit
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev






_______________________________________________
platform-swt-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev

_______________________________________________
platform-swt-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev



--
Leo Ufimtsev, Software Engineer, Red Hat

_______________________________________________
platform-swt-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev