v2: Fail to create Tab control

Report problems with documented functionality
User avatar
aseiot
Posts: 35
Joined: 05 Mar 2017, 04:25

v2: Fail to create Tab control

01 Jul 2020, 05:21

Fail to create Tab control, Following is an example code in help file:

Code: Select all

MyGui := Gui.New()
Tab := MyGui.Add("Tab3",, ["First Tab","Second Tab","Third Tab"])
MyGui.Add("Checkbox", "vMyCheckbox", "Sample checkbox") 
Tab.UseTab(2)
MyGui.Add("Radio", "vMyRadio", "Sample radio1")
MyGui.Add("Radio",, "Sample radio2")
Tab.UseTab(3)
MyGui.Add("Edit", "vMyEdit r5")  ; r5 means 5 rows tall.
Tab.UseTab()  ; i.e. subsequently-added controls will not belong to the tab control.
Btn := MyGui.Add("Button", "default xm", "OK")  ; xm puts it at the bottom left corner.
Btn.OnEvent("Click", (*) => ProcessUserInput(Gui))
MyGui.OnEvent("Close", "ProcessUserInput")
MyGui.OnEvent("Escape", "ProcessUserInput")
MyGui.Show()

ProcessUserInput(this, *)
{
    Saved := this.Submit()  ; Save the contents of named controls into an object.
    MsgBox("You entered:`n" Saved.MyCheckbox "`n" Saved.MyRadio "`n" Saved.MyEdit)
}
User avatar
Ragnar
Posts: 304
Joined: 30 Sep 2013, 15:25

Re: v2: Fail to create Tab control

01 Jul 2020, 06:03

If you mean the error which occurs after pressing OK, fix it by replacing ProcessUserInput(Gui) with ProcessUserInput(MyGui).

If you mean the display issues (no tabs etc.), you are right - it is a bug. This seems to affect only "Tab3" and "Tab2". "Tab" works correctly.
User avatar
kczx3
Posts: 1097
Joined: 06 Oct 2015, 21:39

Re: v2: Fail to create Tab control

01 Jul 2020, 20:13

I am seeing the same thing as Ragnar

Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 17 guests