Jump to content

Can I be CTRL-<mouse click> aware?


LazyCoder
 Share

Recommended Posts

I was working on my little gui, a listview I can sort on one column, and wanted to be able to sort it according to a second column but to be able to do so, I need to manage a CTRL-click event...

I tried to use HotKeySet with CTRLDOWN, CTRLUP to toggle a flag correctly and even with RCTRL, LCTRL... But no way, I can't catch this information.

Indeed, I discovered HotKeySet("{RCTRL}", "ToggleControleState") doesn't work. Certainly because *CTRL* alone are not managed...

Any idea to help me?

Edited by LazyCoder
A good program computing A into B is mostly one that won't crash in all the other cases...
Link to comment
Share on other sites

Thank you very much ezzetabi. With _IsPressed I can make it!

Sorry I made 3 posts for nothing. I was in such a urge that I didn't take time to do what we always must do: search the forum before believing your pb is a brand new one...

LazyCoder (ashamed...)

A good program computing A into B is mostly one that won't crash in all the other cases...
Link to comment
Share on other sites

When I need to sort arrays by two columns, I normally cheat and have a column developed just for sorting by concatenating the primary and secondary sort keys into my third column. This works as long as certain conditions are met. Hopefully the examples below will show the limitations.

Key 1    Key 2     Sort Key
Jones    Fred         JonesFred
Jones    Sally       JonesSally

 1        June        1June
 2        August       2August

It will fail with:

Key 1    Key 2     Sort Key
Jones    Fred         JonesFred
Jone      Steve     JoneSteve

 1         321         1321
 11       25            1125

Tom

Anyone have a TRS 80 Model III for sale?
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...