Silverfrost Forums

Welcome to our forums

Understanding %ib

12 Jun 2006 8:27 #720

I am have trouble understanding the overall callback (%^ib) option of that control. I am looking to 'wrap' a one line image bar to two lines if the window is too small to display the full bar.

It looks as if this callback will help me achieve this, but the explanation of opt=0 and opt=1 goes right over my head. Has anyone managed to achieve this, and if so can you help me out please?

Thanks

Ivor

13 Jun 2006 1:27 #721

Ivor

I do not think that this callback will help you to 'wrap' a toolbar. Off hand I cannot think of a way to do this in ClearWin+ other than by having two versions of the whole window, one for each case. This sounds messy but it is not difficult to implement and probably will display quickly.

I can give you some information about the 'overall' callback but I have not tried it for myself. The options [const_width] and [const_height] were introduced as an easier way to get a similar effect to that of using the overall callback.

In the general case, the supplied images are of varying widths and heights and ClearWin+ has two mechanisms for adjusting the image sizes to create a rectangular grid. One is to use [const_width] and/or [const_height], the other is to use the 'overall' callback. For the varying widths, the callback passes the maximum width on each column. For the varying heights, the callback passes the maximum height on each row.

You get these values by setting opt=0 in the call. i.e. you receive the default values. You set these values by assigning new values to the arrays and by making a call with opt=1.

This allows you to control the width of each column and the height of each row but it does not have any impact on the ability to wrap.

Please login to reply.