GuiControlGet Param4 and DateTime

Report problems with documented functionality
just me
Posts: 9453
Joined: 02 Oct 2013, 08:51
Location: Germany

GuiControlGet Param4 and DateTime

28 Apr 2017, 04:22

GuiControlGet wrote:Note: To unconditionally retrieve any control's text/caption rather than its contents, specify the word Text for Param4.
It doesn't work for DateTime controls.
lexikos
Posts: 9583
Joined: 30 Sep 2013, 04:07
Contact:

Re: GuiControlGet Param4 and DateTime

28 Apr 2017, 19:52

I noticed this when I fixed it for the new API, but I wasn't inclined to touch the v1 Gui code.

It's one of several controls which ignore the "Text" flag, although I think all of the others don't have visible caption text. For MonthCal, UpDown, Slider, Progress, TreeView, ListView and ActiveX it's hidden, and can be retrieved/set with the Control commands. Hotkey too; even though it displays text, retrieving it seems to be impossible.

Did you know that GuiControl, Text sets the control's format, not its text? It doesn't seem to be possible to retrieve the custom format string afterward, nor to set an already-formatted time string. I suppose that format vs formatted text would be the lesser of several inconsistencies (like Text being a fourth parameter vs a sub-command).
just me
Posts: 9453
Joined: 02 Oct 2013, 08:51
Location: Germany

Re: GuiControlGet Param4 and DateTime

29 Apr 2017, 09:17

Well, it's probably not important enough to be changed in v1.1. It might be sufficient to remove the quoted line from the docs. But I hope these 'inconsistencies' will be resolved in v2.
lexikos
Posts: 9583
Joined: 30 Sep 2013, 04:07
Contact:

Re: GuiControlGet Param4 and DateTime

29 Apr 2017, 18:04

If the line was removed, there would be no explanation for what "Text" does for DropDownList and ComboBox. I will correct it.
just me
Posts: 9453
Joined: 02 Oct 2013, 08:51
Location: Germany

Re: GuiControlGet Param4 and DateTime

30 Apr 2017, 03:42

Thanks!

Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 82 guests