Vertical slider

I don't understand how to do slider (to example enumslider) as vertical. 

Please help me with codewink Thanks

Comments

  • YudinEdYudinEd Posts: 90

    I probably did not exactly give the name of the post. It should be called "how to make vertical widget?"

    The documentation has for DzWidget

    enum DzWidget::Orientation

    Enumerated orientation types

    Enumerator:

    Horizontal  Horizontal orientation (Left to Right)
    Vertical  Vertical orientation (Top to Bottom)

    In QT there is Horisontal and Vertical too. 

    I tried to use as DAZ script variables

    DzWidget.Orientation= Vertical // Any widget DzEnumSlider, DzTabWidget - No errors and no changes! 

    I tried too as "vertical" - nothing. What to write instead of the word Vertical ?What am I doing wrong?

  • Richard HaseltineRichard Haseltine Posts: 100,933

    Vertical in your example is being taken as a variable name, with an uninitialised value. To tell the script that you are using the enumeration you need to give it as a member of DzWidget:

    myVScrollbar.orientation = DzWidget.Vertical;

    should work if the syntax is otherwise correct.

     

  • YudinEdYudinEd Posts: 90
    edited March 2017
    var wDlg = new DzDialog;var w = new DzEnumSlider( wDlg)w.orientation = DzWidget.Vertical;w.addItem( "oh" )w.addItem( "my" )w.addItem( "Bob" )w.value = 2;wDlg.exec()

    the Idea is good, but it is not working :(

     

    Post edited by YudinEd on
  • Richard HaseltineRichard Haseltine Posts: 100,933

    Try

    w.orientation = DzEnumSlider.Vertical;

    or

    w.orientation = w.Vertical;

  • YudinEdYudinEd Posts: 90

    Sorry, but there are no changes. I shall try another variants if I'll find :)

  • Richard HaseltineRichard Haseltine Posts: 100,933

    It's possible that scripting doesn't allow for vertically oriented sliders, I can't recall seeing one.

  • YudinEdYudinEd Posts: 90
    edited March 2016

    This is another variant - Slider from QT designer in UI format . Screenshot from DAZ.  But I don't now how I can work with this QT slider using DAZ script functions

    QT slider in Ui format

    Post edited by Chohole on
  • YudinEdYudinEd Posts: 90
    edited March 2017

    ...

    Post edited by YudinEd on
  • YudinEdYudinEd Posts: 90
    edited March 2017

    I took  scrollbar instead of slider, because vertical slider displayed incorrectly  in the DAZ.
    I found the signals in the QT documentation  - sliderReleased() and sliderPressed(), which work in the DAZ script normally. I am satisfied with such a variant

    var loader = new DzUiLoader();var dialog = new DzDialog();var dialogWgt = loader.load("C:/noname.ui",dialog);Slider = dialog.findChildOfWidget("verticalScrollBar"); // Slider name in UI widgetconnect( Slider, "sliderReleased()", myFunc );Slider.setValue(50) // to set parameter. My default from UI file =0 dialog.exec();function myFunc(){{print(Slider.value)}	// testing	}

     

    Post edited by YudinEd on
  • YudinEdYudinEd Posts: 90
    edited March 2017

    I add. You can use signal  valueChanged(int). It's better - parameters change immediately. int constant .  You haven't change it.

    Post edited by YudinEd on
  • Mike3DMike3D Posts: 25

    Seems that some methods & properties are not exposed to scripting. We can't get/set:

    - DzWidget::Orientation

    - DzDynamicDividerWgt::ResizeType

    Is this intentional ? Am I missing something ?

    Thanks

Sign In or Register to comment.