Silverfrost Forums

Welcome to our forums

Greying out %ps tabs

6 May 2012 11:47 #10097

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

7 May 2012 6:45 #10098

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.

7 May 2012 6:24 #10099

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

9 May 2012 5:02 (Edited: 10 May 2012 8:07) #10108

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

9 May 2012 6:37 #10110

As I recall %pv cannot be used with %ps. Try it to see what happens.

9 May 2012 10:47 #10111

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

9 May 2012 9:57 #10116

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

Please login to reply.