Author Topic: Mastering InForm: Can Frames Receive a Click Event?  (Read 21579 times)

0 Members and 1 Guest are viewing this topic.

Offline Qwerkey

  • Forum Resident
  • Posts: 755
    • View Profile
Mastering InForm: Can Frames Receive a Click Event?
« on: September 02, 2018, 06:17:13 am »
According to the Wiki, Frames can receive a Click event, and if so should react to such under the SUB __UI_Click subroutine.  I did try this for a Frame I wanted to react to at run time.  However, a Click had no effect (and the code did not pass through the CASE Framename region).  For my case, it doesn't matter as I changed it to clicking on a Label in the Frame.  That works very nicely.  Richard

FellippeHeitor

  • Guest
Re: Mastering InForm: Can Frames Receive a Click Event?
« Reply #1 on: September 02, 2018, 10:24:19 am »
Do you happen to have changed the control name since inception and could be trying to catch the event for the old name of the frame? In my tests here frames can still respond to clicks.

Offline TempodiBasic

  • Forum Resident
  • Posts: 1792
    • View Profile
Re: Mastering InForm: Can Frames Receive a Click Event?
« Reply #2 on: September 03, 2018, 04:46:00 pm »
Hi friends
here a little demo FrameClick to show the issue of the thread
* Click_Frame_Inform.rar (Filesize: 4.2 KB, Downloads: 355)
Programming isn't difficult, only it's  consuming time and coffee

FellippeHeitor

  • Guest
Re: Mastering InForm: Can Frames Receive a Click Event?
« Reply #3 on: September 03, 2018, 04:52:49 pm »
Thanks for the sample, TempodiBasic! It's very likely that Richard is trying to use an incorrect control id.

PS: Your button doesn't get the hotkey shortcut and shows the ampersand symbol (&) because you're setting the caption directly using Caption(id) = "text" instead of SetCaption id, "text".
« Last Edit: September 03, 2018, 04:57:56 pm by FellippeHeitor »

Offline TempodiBasic

  • Forum Resident
  • Posts: 1792
    • View Profile
Re: Mastering InForm: Can Frames Receive a Click Event?
« Reply #4 on: September 03, 2018, 05:48:03 pm »
Hi Fellippe
Thanks for feedback, IMHO these are old bad behaviours to change for InForm.
Programming isn't difficult, only it's  consuming time and coffee

FellippeHeitor

  • Guest
Re: Mastering InForm: Can Frames Receive a Click Event?
« Reply #5 on: September 03, 2018, 05:55:15 pm »
Bad behaviors?

Offline TempodiBasic

  • Forum Resident
  • Posts: 1792
    • View Profile
Re: Mastering InForm: Can Frames Receive a Click Event?
« Reply #6 on: September 03, 2018, 08:42:08 pm »
Yes
Bad habits taken using old tools from RapidQ VB2008express and someone else. Now I have to focus on how InForm works
Thanks
Programming isn't difficult, only it's  consuming time and coffee

Offline Qwerkey

  • Forum Resident
  • Posts: 755
    • View Profile
Re: Mastering InForm: Can Frames Receive a Click Event?
« Reply #7 on: September 04, 2018, 05:36:32 am »
It's very likely that Richard is trying to use an incorrect control id.

... It's the first thing that I checked, and as far as I could see the id name was correct.  However, I was moving the form & .bas from the root folder to my project folder.  I think that that may have confused things.  Until I have the project finished, I've moved everything back to the root folder.

By the way, am I right to assume that a Hidden control is automatically Disabled?  There is no chance that a user might accidentally cause a Click Event on a hidden (but not disabled) control?

Richard

FellippeHeitor

  • Guest
Re: Mastering InForm: Can Frames Receive a Click Event?
« Reply #8 on: September 04, 2018, 07:56:17 am »
You're right.