Motif: scale widget Problem

Discussion in 'C++' started by Daniel Tscharnuter, Jan 24, 2004.

  1. Hello!

    First of all, I am new to C++.

    The problem with the scale widget is that I get a segmentation fault when I
    want to create it with more than zero decimal numbers.

    beta_scale_ = XtVaCreateManagedWidget("betascale",
    xmScaleWidgetClass, form_left,
    XmNtitleString, title,
    XmNorientation, XmHORIZONTAL,
    XmNminimum, 1,
    XmNmaximum, 10000,
    XmNdecimalPoints, 2,
    XmNshowValue, True,
    XmNvalue, 100,
    XmNwidth, SCALE_WIDTH,
    XmNheight, SCALE_HEIGHT,
    NULL);

    It worked that way in C, but in C++ it only works with XmNdecimalPoints set
    to 0.

    Thanks,
    Daniel

    --
    Port State Service
    666/tcp open doom
    Daniel Tscharnuter, Jan 24, 2004
    #1
    1. Advertising

  2. "Daniel Tscharnuter" <> wrote...
    > First of all, I am new to C++.


    Your problem while shows up in C++ really has nothing to do with C++
    but rather with Motif and its widgets.

    >
    > The problem with the scale widget is that I get a segmentation fault when

    I
    > want to create it with more than zero decimal numbers.
    >
    > beta_scale_ = XtVaCreateManagedWidget("betascale",
    > xmScaleWidgetClass, form_left,
    > XmNtitleString, title,
    > XmNorientation, XmHORIZONTAL,
    > XmNminimum, 1,
    > XmNmaximum, 10000,
    > XmNdecimalPoints, 2,
    > XmNshowValue, True,
    > XmNvalue, 100,
    > XmNwidth, SCALE_WIDTH,
    > XmNheight, SCALE_HEIGHT,
    > NULL);
    >
    > It worked that way in C, but in C++ it only works with XmNdecimalPoints

    set
    > to 0.


    You need to ask about it in a newsgroup dedicated to Motif. This NG only
    deals with C++ _language_ issues, and yours isn't one of them.

    Victor
    Victor Bazarov, Jan 24, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Michel Bardiaux

    Re: Invalid string offset problem in motif.

    Michel Bardiaux, Jul 23, 2003, in forum: C Programming
    Replies:
    0
    Views:
    422
    Michel Bardiaux
    Jul 23, 2003
  2. John Fouhy
    Replies:
    2
    Views:
    595
    John Fouhy
    Jun 25, 2004
  3. Fredrik Lundh
    Replies:
    0
    Views:
    498
    Fredrik Lundh
    Aug 19, 2004
  4. Jeff Epler
    Replies:
    0
    Views:
    495
    Jeff Epler
    Aug 20, 2004
  5. Jeff Epler
    Replies:
    0
    Views:
    443
    Jeff Epler
    Aug 23, 2004
Loading...

Share This Page