Textfield with autocomplete, area with scrolling

Victor_BVictor_B Posts: 391

Hello. Is it possible to create textfield with autocomplete in BasicDialog? I have an array with predefined values for textfield... and... Where can I find example of code, please.

And second question. I have three columns of (too many) checkboxes in BasicDialog. How to put every column to some container with scrolling. Example of code, please.

Thanks.

Post edited by Victor_B on

Comments

  • YudinEdYudinEd Posts: 90
    edited July 2018
    Post edited by YudinEd on
  • Victor_BVictor_B Posts: 391

    Thanks a lot.
    I doubled that code for two areas:
    ---------------------------------------------------------
    var basicDialog = new DzBasicDialog();
    basicDialog.sizeGripEnabled = true;

    var scrollArea = new DzScrollArea(basicDialog);
    scrollArea.alignment = basicDialog.AlignVCenter;
    scrollArea.width = 300;
    scrollArea.height = 100;
    scrollArea.setWidgetResizable = false;
    scrollArea.setHorizontalScrollbarDisplay(true);
    scrollArea.setVerticalScrollbarDisplay(true);
    var font = new Font();
    font.pixelSize = 250;
    var bigTextLabel = new DzLabel(scrollArea);
    bigTextLabel.wordWrap = false;
    bigTextLabel.text = "Where are the scroll bars????";
    bigTextLabel.font = font;
    scrollArea.setWidget(bigTextLabel);
    basicDialog.addWidget(scrollArea);

    var scrollArea = new DzScrollArea(basicDialog);
    scrollArea.alignment = basicDialog.AlignVCenter;
    scrollArea.width = 300;
    scrollArea.height = 100;
    scrollArea.widgetResizable = true;
    scrollArea.setHorizontalScrollbarDisplay(true);
    scrollArea.setVerticalScrollbarDisplay(true);
    var font = new Font();
    font.pixelSize = 250;
    var bigTextLabel = new DzLabel(scrollArea);
    bigTextLabel.wordWrap = false;
    bigTextLabel.text = "Where are the scroll bars????";
    bigTextLabel.font = font;
    scrollArea.setWidget(bigTextLabel);

    basicDialog.addWidget(scrollArea);
    basicDialog.exec();
    ------------------------------------------------------

    and get vertically placed areas. Not bad, but is it possibleto placethem horizontally? I played with alightment settings, but without success.
    scrollArea.alignment = basicDialog.AlignVCenter --- ???

    Any ideas?

    p.s.: seems like width and height settings are useless here. they are doing nothing. it's a pity.

    001.png
    1182 x 858 - 93K
  • YudinEdYudinEd Posts: 90
    edited July 2018

    You can use too

    scrollArea.y=... // Y position for scrollarea into the basicDialog

    scrollArea.x=... // X position

    Post edited by YudinEd on
  • Victor_BVictor_B Posts: 391
    edited July 2018

    I spent one more hour with no success, so I start to think that horizontal placement will be good enought for my script too.

    Thanks.

    Post edited by Victor_B on
Sign In or Register to comment.