Machsupport Forum

Mach Discussion => Mach4 General Discussion => Topic started by: DazTheGas on September 06, 2015, 12:30:41 PM

Title: Mach4 New Tabs
Post by: DazTheGas on September 06, 2015, 12:30:41 PM
Finally in 4.2.0.2673 the mach team has found the wxAuiNotebook Class to make the tabs look pretty, I had already coded them into my screen, and the old mach wxnotebook tabs looked dull against them as in first pic, but now look a lot better. (second pic)

But unfortunately mach4 now starts off on the wrong screen and so have I to put scr.SetProperty('Screens', 'Current Tab', '0') in the Screen Load Script.

DazTheGas
Title: Re: Mach4 New Tabs
Post by: Mauri on September 06, 2015, 06:52:22 PM
Das,
Where do you put the scr.SetProperty('Screens', 'Current Tab', '0') ?
I tried it in a number of places and it still comes up with that Probing Screen?
Regards,
Mauri.
Title: Re: Mach4 New Tabs
Post by: DazTheGas on September 07, 2015, 03:13:56 AM
Go into edit screen - highlight the screen name in the top left pane and click the thunder bolt in the bottom pane you should now see the screen load script.

DazTheGas
Title: Re: Mach4 New Tabs
Post by: DazTheGas on September 07, 2015, 04:29:05 AM
Sorry just realized, if your using any of the stock screens then you need scr.SetProperty('MainTabs', 'Current Tab', '0')  not Screens, as thats what mine are called.

Daz
Title: Re: Mach4 New Tabs
Post by: Durero on November 12, 2015, 12:32:24 AM
I was kindly directed to this thread by blockhead.

I've tried adding the scr.SetProperty('MainTabs', 'Current Tab', '0') at the end of the Screen Load Script.

Still coming up with the Probing Screen every time I startup Mach4.

I've tried every variation I can think of including different tab numbers but no luck.

Any further thoughts on this little problem would be most appreciated.

Leo
Title: Re: Mach4 New Tabs
Post by: dude1 on November 12, 2015, 01:40:31 AM
what version are you useing
Title: Re: Mach4 New Tabs
Post by: DazTheGas on November 12, 2015, 01:55:21 AM
on some versions the mach remembers what tab was showing when you leave the screen editor, if you go into screen editor highlight the start screen change something and then use the save screen from the drop down menus, this normally corrects the problem for me.

Daz
Title: Re: Mach4 New Tabs
Post by: Durero on November 12, 2015, 03:35:24 AM
I'm using Mach4 version 2686 because I'm using an Ethernet Smooth Stepper and was having troubles with the newer versions of Mach4.

I have made many attempts to use the screen editor to save the desired tab as you described Dez, but none have worked so far.


I'm wondering if I should try the latest version of Mach4 again now that I've got motor and spindle control back.  Hopefully there will be a new version of the ESS plugin soon!

Leo
Title: Re: Mach4 New Tabs
Post by: dude1 on November 12, 2015, 03:38:49 AM
no don't change you may just need to reinstall, it may off gone bad. make sure you do a backup first.
Title: Re: Mach4 New Tabs
Post by: Durero on November 12, 2015, 03:41:12 AM
Thanks blockhead, I'll give that a try.
Title: Re: Mach4 New Tabs
Post by: DazTheGas on November 12, 2015, 07:34:57 AM
Its not bad install 2686 had a bug and using the set tab cures it.

scr.SetProperty('MainTabs', 'Current Tab', '0')  needs to be in startup script

Daz
Title: Re: Mach4 New Tabs
Post by: DazTheGas on November 12, 2015, 08:44:12 AM
Actually just remembered, in 2686 it had to be moved to the PLC script and done in the first run section at the bottom of the script.

Daz
Title: Re: Mach4 New Tabs
Post by: Durero on November 12, 2015, 07:01:05 PM
Thanks Daz!

I'll give this a try.

Leo
Title: Re: Mach4 New Tabs
Post by: Durero on November 12, 2015, 07:20:17 PM
It worked!

Although my first attempt caused my chosen tab to keep re-selecting itself when I tried to click on any of the others.

Putting the sir.SetProperty('MainTabs', 'Current Tab', '0') statement within the test condition "if testrun==1" (or something like that) solved the problem.

Thanks again Daz.