|
forums.silverfrost.com Welcome to the Silverfrost forums
|
View previous topic :: View next topic |
Author |
Message |
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2388 Location: Yateley, Hants, UK
|
Posted: Sun May 06, 2012 12:47 pm Post subject: Greying out %ps tabs |
|
|
I see in CLEARWIN.ENH that EnableWindow can be used to disable/re-enable %ps pages. Is there a "show stopper" reason why this can't be done using the otherwise almost-ubiquitous greycode method - it would be very convenient if it did.
(Because using EnableWindow does make the sheet inaccessible, but it doesn't "grey out" the tab).
Eddie |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Mon May 07, 2012 7:45 am Post subject: |
|
|
It may be possible to provide an enhancement so that %sh can take a tilda and grey control but this would not be a simple task and it would only have the same effect as EnableWindow.
It appears that %ps has undocumented options and, depending on which options are chosen, ClearWin+ either creates its own tab control or it uses the Microsoft SysTabControl32. Either way, there is no facility to grey out as well as disable. In theory it could be programmed for the internal tab control but only by a grass roots approach. The Microsoft tab control does not have this capability.
Here are the undocumented options...
[ms_style] uses the Microsoft SysTabControl32.
[bottom] puts the tabs at the bottom (implies ms_style)
[hot_track] changes the appearance of the tab on hover (implies ms_style)
Using ms_style etc. looks better with the XP theme provided by the default XP manifest.
You can also use [alt_style] on a %ps used with %di. |
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2388 Location: Yateley, Hants, UK
|
Posted: Mon May 07, 2012 7:24 pm Post subject: |
|
|
Hi Paul,
Well that was an unexpected discovery! I think that I will need to experiment with ms_style and/or hot_track before settling on one for my application. hot_track gives mouseover sensitivity to all the tabs - even for tabs where the associated window is disabled, so it compounds the problem of enticing a user to click on the tab of a disabled sheet.
I may try to simulate the effect of tabs by means of a toolbar or even a %gr block.
My underlying problem is that I want to lead a user through a complex calculation step at a time, but allowing back-tracking. My initial attempt is a series of 6 sheets. Initially only sheet 1 is enabled. As the data is put in, the user can advance through the sheets. However, my inability to grey out the disabled tabs means that there is a visual cue that the user can move through them as he wishes - and that is not my intention.
I am also having some difficulty with CALL SEE_PROPERTYSHEET_PAGE@ (i.e. I can't seem to make it work!). If I put a button on a sheet that implies "now do all the validation checks on the data" I have found that there is an underlying expectation on the part of the user that this should advance to the next sheet as well (currently there is only one user - me!). If I have such a button then I can leave all those checks to a single call-back, whereas I have otherwise to do lots of checks as data is entered and the complexity of that is rather beyond my grey matter.
Underlying all of this is a problem that I don't have a clear conception of what the user interface should look like, and this is just experimentation.
Eddie |
|
Back to top |
|
|
DanRRight
Joined: 10 Mar 2008 Posts: 2816 Location: South Pole, Antarctica
|
Posted: Wed May 09, 2012 6:02 am Post subject: |
|
|
Paul, those undocumented options are kind of cool. Is there an option to use %pv with %ps to resize it like graphics window? I know it is possible to do that with other tricks but %pv is just simpler
Eddie, I had two problems with %ps before which took a lot of time to find and resolve, and one was an access violation and the reason was in the set_propertysheet - its major parameter was not initialized. Usually Clearwin is ok with that but not in this case
I do not know what kind of problems you specifically have with see_propertysheet_page but i will mention it. In the example below it's good to make n_CurrSheetSettings=1 somewhere in the start of the program and then all looks like that to work (i took example from the older code written in Fortran 77)
Program AAA
parameter (n_Settings =21)
common /Settings01_/n_CurrSheetSettings, ictrSettings (n_Settings )
n_CurrSheetSettings = 1
!...
!...
end
!.............................
integer*4 function aaaaaa()
parameter (n_Settings =21)
common /Settings01_/n_CurrSheetSettings, ictrSettings (n_Settings )
integer cbupdateSettings
external cbupdateSettings
!...
!...
i = winio@('%^`21ps&',ish1, ish2, ish3, ish4, ish5, ish6,&
& ish7, ish8, ish9, ish10, ish11, ish12, ish13, ish14, ish15, ish16, ish17,ish18,ish19,ish20,ish21, &
& n_CurrSheetSettings, cbupdateSettings)
!...
!...
end function aaaaaa
!.......................................
integer*4 function cbupdateSettings()
use clrwin
parameter (n_Settings =21)
common /Settings01_/n_CurrSheetSettings, ictrSettings (n_Settings )
call see_propertysheet_page@ (n_CurrSheetSettings)
cbupdateSettings=2
end function cbupdateSettings
Last edited by DanRRight on Thu May 10, 2012 9:07 am; edited 3 times in total |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Wed May 09, 2012 7:37 am Post subject: |
|
|
As I recall %pv cannot be used with %ps. Try it to see what happens. |
|
Back to top |
|
|
DanRRight
Joined: 10 Mar 2008 Posts: 2816 Location: South Pole, Antarctica
|
Posted: Wed May 09, 2012 11:47 am Post subject: |
|
|
Wow i am sure it did not before ... but now it works! I remember i was playing with it to make this possible with something like window_resize a decade ago to be able to resize graphics inside the tab and even asked to help with this. Cool. Thanks |
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2388 Location: Yateley, Hants, UK
|
Posted: Wed May 09, 2012 10:57 pm Post subject: |
|
|
I think my problem with seeing a specific page is my fault for not using the grave modifier - if it hadn't been for your demo, Dan, I wouldn't have understood it. So thanks.
I'm still experimenting with some of the options.
Eddie |
|
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
|