Machsupport Forum
Mach Discussion => Mach4 General Discussion => Topic started 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
-
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.
-
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
-
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
-
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
-
what version are you useing
-
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
-
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
-
no don't change you may just need to reinstall, it may off gone bad. make sure you do a backup first.
-
Thanks blockhead, I'll give that a try.
-
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
-
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
-
Thanks Daz!
I'll give this a try.
Leo
-
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.