|
forums.silverfrost.com Welcome to the Silverfrost forums
|
View previous topic :: View next topic |
Author |
Message |
Kenneth_Smith
Joined: 18 May 2012 Posts: 697 Location: Hamilton, Lanarkshire, Scotland.
|
Posted: Sat Dec 19, 2020 4:56 pm Post subject: %dl and %th combined in same window |
|
|
The following code demonstrates an unexpected problem I came across yesterday when adding %th help messages to a window that also has a %dl timer.
If the same window uses %th and %dl, when the user places (and keeps) the mouse over the control with the %th, the displayed help will appear and then disappear at the next instant the %dl call back is run.
I wonder if the %dl call back should be inhibited internally by Clearwin+ when %th is displaying a help message? Reason - the program is not idle (i.e. awaiting input) since it is displaying a help message.
Ken
Code: | module test
implicit none
integer :: k = 1
contains
integer function increment_cb()
k = k + 1
increment_cb = 1
end function increment_cb
integer function gui2()
integer, save :: iw
iw = winio@('%mn[Exit]&','exit')
iw = winio@('%th[delay]&', 1, 500)
iw = winio@('Value of K%ta%`8rd%ta%^?bt[INC][Add 1 to K]&', k, increment_cb)
iw = winio@('%dl',5.d0,do_something_cb)
gui2 = 2
end function gui2
integer function do_something_cb()
print*, '%dl call back'
do_something_cb = 2
end function do_something_cb
end module test
program main
use test
i = gui2()
end program main |
|
|
Back to top |
|
|
wahorger
Joined: 13 Oct 2014 Posts: 1217 Location: Morrison, CO, USA
|
Posted: Sat Dec 19, 2020 11:02 pm Post subject: |
|
|
This is an interesting problem.
I wonder if, because of the %dl callback, the underlying window would have a "FOCUS_LOST" event occur? That would explain the help text disappearing. |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7928 Location: Salford, UK
|
Posted: Sun Dec 20, 2020 11:57 am Post subject: |
|
|
I will take a look at this.
The quick fix is to add %th[ms_style]. |
|
Back to top |
|
|
Kenneth_Smith
Joined: 18 May 2012 Posts: 697 Location: Hamilton, Lanarkshire, Scotland.
|
Posted: Sun Dec 20, 2020 12:22 pm Post subject: |
|
|
Paul,
No need to looked at this, I missed the [no_callback_hide] option when reading the documentation.
Ken |
|
Back to top |
|
|
|
|
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 You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|