[Gambas-user] Detecting just Control Key

Fabien Bodard gambas.fr at gmail.com
Thu Oct 25 14:12:04 CEST 2018


If you want to do that you must use the Mouse event :

Public Sub MyGrid_MouseDown()

  If Mouse.Ctrl then
     MyGrid......
  end if

End

Le jeu. 25 oct. 2018 à 13:31, David Sanromá <dsanroma at gmail.com> a écrit :

> Hello everyone,
>
> I am brand new to Gambas and I must say I am loving it.
>
>
> I do have 2 questions...
>
> * I am trying to use a GridView (Mode = Single) and once I select an
> element, I don't seem to find the way to "Unselect" it via the UI in
> run-time. I tried Ctrl+Click, Alt+Click, Shift.... and so on and no
> dice. Something I should know ?
>
>
> * I tried to "implement" my own Ctrl+Click to unselect the current row
> and I found an strange behavior which seems inconsistent with the
> documentation.
>
>
> Public Sub FormatsGridView_KeyPress()
>
>      Print Key.Control
>
> End
>
>
> It prints False when I just press the Ctrl key by it self. However, it
> prints True when I press Ctrl+A
>
>
> I tried the code in the documentation
> (http://gambaswiki.org/wiki/comp/gb.qt4/key/control?nl) and same thing.
> Me.Text is always set to False if the only key that is pressed is the
> Control key by itself.
>
>
> Please forgive my inexperience with Gambas ;)
>
> TIA,
>
> David
>
>
>
> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----
>


-- 
Fabien Bodard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20181025/595d89a6/attachment.html>


More information about the User mailing list