Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Canvas ResizeControls Missing TimeItem Picker?

    Reporting a possible oversight?

    I'm enjoying the new v12 sizing controls. Before I create any canvases, I do a global setting:
    Code:
    int deltaPixels = 6;
    Canvas.resizeControls(deltaPixels);
    Canvas.resizeFonts(deltaPixels);
    This works as expected for all, except for the AM/PM SelectItem of a TimePicker. The picker is only wide enough to show "A" or "P". The Hour & Minute items do seem to obey the resize settings.

    I fixed it easily enough, but thought you might want to know.

    Code:
        TimeItem sixMinuteIncrements = new TimeItem() {
            {
                setMinuteIncrement(6);
    
                setAmpmItemProperties(new SelectItem() {
                    {
                        setWidth(60); // This fixes it
                    }
                });
            }
        };
    
        DateTimeItem dateTimeItemFrom = new DateTimeItem(REQUESTS.STARTDATETIME, "From") {
            {
                setRequired(Boolean.TRUE);
                setUse24HourTime(Boolean.FALSE);
                setValue(initialDateFrom);
                setPickerTimeItemProperties(sixMinuteIncrements);
                setWidth(260); // seems to work w/ v12 larger fonts/controls, accommodates widest date
                // "12/22/2019 10:00 AM"
    
                setValidators(validatorFrom);
                setValidateOnChange(Boolean.TRUE);
    
                ...
            }
        };
    Chrome Version 77.0.3865.90 (Official Build) (64-bit)

    SmartClient Version: v12.0p_2019-10-06/PowerEdition Deployment (built 2019-10-06)

    #2
    This one's been fixed for builds dated October 23 and later.

    In the meantime, you should see it autosize correctly if you set width to null, rather than 60.
    Last edited by Isomorphic; 21 Oct 2019, 23:52.

    Comment

    Working...
    X