[comp.windows.x.motif] Help - Weird Toggle Button, Motif 1.0

markt@tse.uucp (Mark Turner) (06/06/91)

Hi folks! I'm having difficulties with the Motif toggle button gadget.

I've created a radio box with six "one-of-many" toggle buttons. Strangely 
enough, the diamond indicators are not drawn in accordance with the Motif 
Style Guide. Here's how my diamonds appear as opposed to "normal" diamonds ...

 /a        Assume that each border consists of two slashes. Position "a" is
//         missing a slash, while position "b" has gained a slash. The upper
\\b //     right-hand side of the diamond appears to be slashless altogether.
 \\//

 //        Normal diamond, I presume - or should it *not* be missing the upper 
//         right-hand side?
\\  //
 \\//

I have borderWidth and shadowThickness set to zero, topShadowColor is "white",
bottomShadowColor is "black" and background is "grey". (I've chosen these colors
to help me dianose this problem, not for their aesthetic qualities.) I'm running
Motif 1.0 under SCO/UNIX ODT 1.0 and I create the radio box and toggle buttons 
using UIL.  By the way, the rest of my program appears bug-free and all other 
graphic elements are displayed as expected. This strange behaviour is exhibited
in both "on" and "off" toggle states.

Help! Is this a known bug, or I have I just messed it up?

For those who are interested, here's part of my UIL ...

> object statusRadio : XmRadioBox
>     {
>     arguments
>         {
>             XmNtopAttachment        = XmATTACH_POSITION;
>             XmNtopPosition          = posRadioT;
>             XmNbottomAttachment     = XmATTACH_POSITION;
>             XmNbottomPosition       = posRadioB;
>             XmNleftAttachment       = XmATTACH_POSITION;
>             XmNleftPosition         = posRadioL;
>             XmNrightAttachment      = XmATTACH_POSITION;
>             XmNrightPosition        = posRadioR;
>             XmNpacking              = XmPACK_COLUMN;
>             XmNnumColumns           = 1;
>             XmNborderWidth          = 1;
>         };
>     controls
>         {
>             XmToggleButton    
>                 {
>                 arguments
>                     {
>                     arguments radioArgs;
>                     XmNlabelString  = 'Open';
>                     };
>                 };
> 
>     etc ....
> 

--------------------------------------------------------------------------------
Mark Turner (markt@tse.UUCP), The Toronto Stock Exchange    

burkett@cs.scarolina.edu (Dan Burkett) (06/06/91)

markt@tse.uucp (Mark Turner) writes:



>Hi folks! I'm having difficulties with the Motif toggle button gadget.

>I've created a radio box with six "one-of-many" toggle buttons. Strangely 
>enough, the diamond indicators are not drawn in accordance with the Motif 
>Style Guide. Here's how my diamonds appear as opposed to "normal" diamonds ...

> /a        Assume that each border consists of two slashes. Position "a" is
>//         missing a slash, while position "b" has gained a slash. The upper
>\\b //     right-hand side of the diamond appears to be slashless altogether.
> \\//

> //        Normal diamond, I presume - or should it *not* be missing the upper 
>//         right-hand side?
>\\  //
> \\//

 //\\   I think this is what you should have - with the shadowing effect
//  \\  of course. What you have above is usually encountered when the
\\  //  the background and one of the border colors is the same - evidently
 \\//   not what you have described.
I don't know that I can help with the problem other than to suggest creating
one toggle button and see if the problem persists - or create a toggle button
in something other than a radio box to determine if the progblem is with the
toggle or radio box widget.
Good Luck.
ricky