replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - check_on_focus_loss
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 

check_on_focus_loss

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
Wilfried Linder



Joined: 14 Nov 2007
Posts: 314
Location: D�sseldorf, Germany

PostPosted: Tue May 07, 2013 4:36 pm    Post subject: check_on_focus_loss Reply with quote

Here is something funny. I use check_on_focus_loss to make it possible to key in a percentage of say 50. Then, the lower values (width, height) are not updated when I set the percentage using the spin wheel. But if I delete check_on_focus_loss, the update works well.

Code:
      program test

      IMPLICIT NONE
      INCLUDE <WINDOWS.INS>

      external       prop_fix,s2z,z2s

      integer*4      j,zei,spa,proz,s_spa,s_zei

      common  /i_size/   zei,spa,proz,s_spa,s_zei

      spa   = 4000
      zei   = 3000
      proz  = 100
      s_spa = spa
      s_zei = zei

      j = winio@('%ca[Test]%sy[3d_thin]%fn[MS SANS SERIF]%tsImage size'
     *    //'%co[check_on_focus_loss]%dd%il%^4rd%% or%ffWidth%il%^6rd'
     *    //'pxl, Height%il%^6rdpxl%ff%nl%cn%`7bt[OK]',.96D0,10,10,
     *    1000,proz,prop_fix,1,99999,s_spa,s2z,1,99999,s_zei,z2s)

      end
 
C ====================================================================== CCCC
 
      INTEGER FUNCTION prop_fix()

      IMPLICIT NONE

c     via percentage
 
      integer*4     proz,s_spa,s_zei,zei,spa
      real*8        r

      common  /i_size/   zei,spa,proz,s_spa,s_zei
 
      r = dble(proz)/100.D0
      s_spa = nint(r*spa)
      s_zei = nint(r*zei)
      prop_fix = 1
      end

      INTEGER FUNCTION z2s()
 
      IMPLICIT NONE

c     via rows
 
      integer*4     proz,s_spa,s_zei,zei,spa
      real*8        r

      common  /i_size/   zei,spa,proz,s_spa,s_zei
 
      r = dble(s_zei)/dble(zei)
      proz  = nint(100.D0*r)
      s_spa = nint(r*spa)
      z2s = 1
      end

      INTEGER FUNCTION s2z()
 
      IMPLICIT NONE

c     via columns
 
      integer*4     proz,s_spa,s_zei,zei,spa
      real*8        r

      common  /i_size/   zei,spa,proz,s_spa,s_zei
 
      r = dble(s_spa)/dble(spa)
      proz  = nint(100.D0*r)
      s_zei = nint(r*zei)
      s2z = 1
      end


Regards - Wilfried
Back to top
View user's profile Send private message
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2402
Location: Yateley, Hants, UK

PostPosted: Tue May 07, 2013 8:58 pm    Post subject: Reply with quote

It looks OK to me. You only lose the focus when you select another control. If you click on the width or height read boxes, their values update. If you give the OK button a callback you will see that pressing it updates the width and height windows.

Eddie
Back to top
View user's profile Send private message
Wilfried Linder



Joined: 14 Nov 2007
Posts: 314
Location: D�sseldorf, Germany

PostPosted: Wed May 08, 2013 6:14 am    Post subject: Reply with quote

Yes, but ... if I use the spinwheel for percentage, the lower values should update immediately. But no problem. My simple solution in this case: I work without check_on_focus_loss, use 1 and 1000 as limits for %il and set the percentage value to max(proz,10) outside the window.

Wilfried
Back to top
View user's profile Send private message
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2402
Location: Yateley, Hants, UK

PostPosted: Wed May 08, 2013 10:49 am    Post subject: Reply with quote

Wilfried,

If you use the spinwheel the focus isn't lost just because you clicked on an up or down arrow - it is only lost when you select a completely different control (the spin up/down and the %rd form a sort of composite control).

On another matter, I find the spin up/down controls a little small, and if selecting a particular number is very significant in a dialog box I increase the font size, as in:

Code:
      IA = WINIO@ ('%fn[Arial]%ts&', 2.0D0)
      IA = WINIO@('%`bg[white]%il%dd%^rd&', ....


This makes the whole control much bigger and the spin up/down buttons are then easier to select.

If you want different spin controls you can program everything in a small %gr box but this is a lot of effort for only a cosmetic gain.

Eddie
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support 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