dcbrowsecolumn ...SORT LEFTBUTTON

This forum is for eXpress++ general support.
Post Reply
Message
Author
skiman
Posts: 1183
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

dcbrowsecolumn ...SORT LEFTBUTTON

#1 Post by skiman »

Hi,

Sorting a column with dcbrowse is rather easy, however using the left button is a problem. You can use the LEFTBUTTON clause, but at that moment there is a problem when resizing the column.

I was wondering why this is working in all Windows applications as Explorer, Outlook, ... and not in our application.

With a minor change in _dcxbrow.prg you can have the normal behaviour:
- Left button down + move + left button up: resize of column.
- Left click: sort column.

In _dcxbrow.prg you need to change the heading:lbDown to heading:lbClick at 6 lines.

The result is a browse where you can use the LEFTBUTTON clause of dccolumn to get the normal behaviour for resizing and sorting.

It's up to Roger to decide to make this a default behaviour or not.
Best regards,

Chris.
www.aboservice.be

User avatar
Tom
Posts: 1165
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: dcbrowsecolumn ...SORT LEFTBUTTON

#2 Post by Tom »

We checked that with our users some years ago. Most of them would expect to have the chance to move the column with the left button (hold + move). They would try to sort with a double click of the left mouse button. Just one click with the left mouse button is not what they expect as the way to sort a column (which may cause trouble if the user doesn't remind what sorting was correct before). So we theached our users to sort with the right mouse button and to change the column width with the right mouse button when the cursor points on the limiter. In our apps, the double click (left) on a column header sets all columns to their optimal width.

So, thanks for the advice, but: Please Roger, do not set this as the standard behaviour! ;)
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

skiman
Posts: 1183
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: dcbrowsecolumn ...SORT LEFTBUTTON

#3 Post by skiman »

Hi Tom,

Sorting with a single left click is a default behaviour is most Windows applications. Anyway, if you don't use the LEFTBUTTON clause in the SORT, nothing would change.

I'm using external tools as Codejock reporting tool, where a left click is sorting. It is a bit annoying to teach our customers to use a left click in a report and a right click in a browse.

Default in most Windows applications is:
- Left moving is changing header width.
- Left click is sorting.
- Left double click is optimizing.

With eXPress we have the benefit to have the behaviour as we want, since we have the source available. :P
Best regards,

Chris.
www.aboservice.be

User avatar
rdonnay
Site Admin
Posts: 4722
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: dcbrowsecolumn ...SORT LEFTBUTTON

#4 Post by rdonnay »

I would NEVER change the default behavior, but I can create a Get-Set function that would allow the programmer to set the default behavior.
The eXpress train is coming - and it has more cars.

skiman
Posts: 1183
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: dcbrowsecolumn ...SORT LEFTBUTTON

#5 Post by skiman »

Hi Roger,

Maybe I wrote it the wrong way.

With the above changes Tom's users wouldn't notice any change. When the LEFTBUTTON clause isn't used, there is no change.

When a developer uses the LEFTBUTTON clause, the users would notice that now they can change the width of the column, and can use the left click to sort.

I'm wondering why the lbDown and rdDown are used, instead of the lbClick and rbClick? If you test this in Windows explorer, they use the click, the down is reserved to notice a move.

Anyway, you don't have to modify this for me, but I think it is an improvement. I have it modified in my version of dcbrowse, so I'm using it as I want.
Best regards,

Chris.
www.aboservice.be

Post Reply