forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

%dl and %th combined in same window

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+
View previous topic :: View next topic  
Author Message
Kenneth_Smith



Joined: 18 May 2012
Posts: 697
Location: Hamilton, Lanarkshire, Scotland.

PostPosted: Sat Dec 19, 2020 4:56 pm    Post subject: %dl and %th combined in same window Reply with quote

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
View user's profile Send private message Visit poster's website
wahorger



Joined: 13 Oct 2014
Posts: 1217
Location: Morrison, CO, USA

PostPosted: Sat Dec 19, 2020 11:02 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Sun Dec 20, 2020 11:57 am    Post subject: Reply with quote

I will take a look at this.

The quick fix is to add %th[ms_style].
Back to top
View user's profile Send private message AIM Address
Kenneth_Smith



Joined: 18 May 2012
Posts: 697
Location: Hamilton, Lanarkshire, Scotland.

PostPosted: Sun Dec 20, 2020 12:22 pm    Post subject: Reply with quote

Paul,

No need to looked at this, I missed the [no_callback_hide] option when reading the documentation.

Ken
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+ All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
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