Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Thu Nov 15, 2018 12:03 am
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: KeyDown doesn't fire for Rectangle Control
PostPosted: Mon Aug 27, 2012 8:14 pm 
Offline

Joined: Fri Oct 28, 2011 12:41 am
Posts: 11
Friends:

Have placed a standard Rectangle control on a new Desktop form using R2011r4.3 under Windows.

Put "break" into MouseDown and KeyDown events.

MouseDown event "breaks" for mouse-down in rectangle.

KeyDown event never fires in rectangle (no "break").

How do we activate KeyDown for a Rectangle control?

TextField control does break for MouseDown and KeyDown events.

_________________
Mike Linacre


Top
 Profile  
Reply with quote  
 Post subject: Re: KeyDown doesn't fire for Rectangle Control
PostPosted: Mon Aug 27, 2012 8:26 pm 
Offline

Joined: Mon Aug 14, 2006 9:33 pm
Posts: 1774
A rectangle can't accept text, so I wouldn't expect that control to fire a keydown event. The rectangle is a seldom used control for most RB'ers. What is it you are trying to accomplish?

_________________
Roger Clary
Class One Software
Educational Software for Lifelong Learning
http://www.classonesoftware.com


Top
 Profile  
Reply with quote  
 Post subject: Re: KeyDown doesn't fire for Rectangle Control
PostPosted: Mon Aug 27, 2012 9:17 pm 
Offline
User avatar

Joined: Sun Aug 05, 2007 10:46 am
Posts: 4931
Location: San Diego, CA
I never use the rectangle object (draw my own on a canvas when required).

But I did find it interesting that the RECTANGLE DOES have a KEYDOWN event..... but NOT a GOTFOCUS event... and it would have to have FOCUS for a KEY event to occur.

MOUSEDOWN works as to the other MOUSE events.... heck even the Contextual Menu events work..

Perhaps RS should think about hiding the KEYDOWN and KEYUP events to remove any future confusion?

_________________
Dave Sisemore
iMac I7[2012], OSX Mountain Lion 10.8.3 RB2012r2.1
Note : I am not interested in any solutions that involve custom Plug-ins of any kind


Top
 Profile  
Reply with quote  
 Post subject: Re: KeyDown doesn't fire for Rectangle Control
PostPosted: Tue Aug 28, 2012 12:36 am 
Offline

Joined: Fri Oct 28, 2011 12:41 am
Posts: 11
Thanks, DaveS and classone. Yes, an inoperable event is confusing :?

I am using a rounded rectangle to make a custom button. It works fine for MouseDown, but it needs KeyDown and TabIndex for keyboard-oriented users.

DaveS, thanks for the Canvas suggestion. Surrounding the button with a Canvas, and using the Canvas MouseDown event, may have solved the problem :D

Here is what the custom button looks like:
Image - mouse not on control (MouseExit)
Image - mouse on control (MouseEnter)
Image - MouseDown on control

_________________
Mike Linacre


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group