Announcement

Collapse
No announcement yet.

BUG: ComboBox Object

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • BUG: ComboBox Object

    Create new AMS project. Place this code on page event "On Show":

    Code:
    -- new combo properties
    tNEWCOMBO = {};
    tNEWCOMBO.ComboStyle = DROPDOWN_LIST;
    tNEWCOMBO.Sort = false;
    tNEWCOMBO.LinesToDisplay = 7;
    tNEWCOMBO.FontName = "Segoe UI";
    tNEWCOMBO.FontSize = 9;
    tNEWCOMBO.FontStrikeout = false;
    tNEWCOMBO.FontUnderline = false;
    tNEWCOMBO.FontAntiAlias = false;
    tNEWCOMBO.FontItalic = false;
    tNEWCOMBO.FontWeight = FW_NORMAL;
    tNEWCOMBO.FontScript = DEFAULT_CHARSET;
    tNEWCOMBO.BackgroundColor = 16777215;
    tNEWCOMBO.TextColor = 0;
    tNEWCOMBO.ReadOrder = READ_STANDARD; -- or false
    tNEWCOMBO.Enabled = true;
    tNEWCOMBO.Visible = true;
    tNEWCOMBO.X = 10;
    tNEWCOMBO.Y = 10;
    tNEWCOMBO.Width = 100;
    tNEWCOMBO.ResizeLeft = false;
    tNEWCOMBO.ResizeRight = false;
    tNEWCOMBO.ResizeTop = false;
    tNEWCOMBO.ResizeBottom = false;
    tNEWCOMBO.TooltipText = "";
    tNEWCOMBO.ObjectName = "NewCombo";
    -- creating new combo object
    Page.CreateObject(OBJECT_COMBOBOX, tNEWCOMBO.ObjectName, tNEWCOMBO);
    -- redraw area
    Page.Redraw();
    Width of created object will not be 100pix. Parameter "Width" is ignored.

    OS: Windows 7 x64
    AMS ver. 8.0.7.0

  • #2
    I can confirm that when you place this code in the On Preload script, indeed the Width field is not considered during the creation of the object. Using ComboBox.SetProperties() right after the creation allows to set the desired width for now.
    Code:
    -- creating new combo object
    Page.CreateObject(OBJECT_COMBOBOX, tNEWCOMBO.ObjectName, tNEWCOMBO);
    ComboBox.SetProperties(tNEWCOMBO.ObjectName, {Width=tNEWCOMBO.Width});
    I have logged the issue to be looked into.

    Ulrich

    Comment


    • #3
      Another confirm here, workaround seems to work too.
      Bas Groothedde
      Imagine Programming :: Blog

      AMS8 Plugins
      IMXLH Compiler

      Comment


      • #4
        I know that the function ComboBox.SetSize("Name", [Width]) after creating object is working. But I think it should work while function Page.CreateObject() is called. At all ComboBox object is very buggy object you know. There are another little bugs are found. For example, with setting mask on ComboBox by Window.SetMask() function. Msk is blonking while focusing or select ComboBox, in addition msk is blinking while mouse move around (not on ComboBox object). Another bugs I can't explane because my English not good.

        Comment

        Working...
        X