Hi,
is it possible to hide Label, Buttun or UserButton by code during runtime?
Example : Hide a UserButton during Gcode program execution.
Thanks
Label, button and UserButton Hide in runtine
Moderators: TomKerekes, dynomotion
-
- Posts: 1
- Joined: Tue Dec 20, 2022 8:57 pm
- TomKerekes
- Posts: 2676
- Joined: Mon Dec 04, 2017 1:49 am
Re: Label, button and UserButton Hide in runtine
Yes if it is a Custom Screen you can send Screen Script to change the Show property from 1 to 0.
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
- TomKerekes
- Posts: 2676
- Joined: Mon Dec 04, 2017 1:49 am
Re: Label, button and UserButton Hide in runtine
Here is an example to hide User Button 10. The first 10 User buttons should be avoided because those buttons can be shown/hidden in the Tool Setup | User Buttons so there can be a conflict when the Tool Setup state is different for the Screen Script for those buttons.
Code: Select all
#include "KMotionDef.h"
#define TMP 10 // which spare persist to use to transfer data
#include "KflopToKMotionCNCFunctions.c"
void main()
{
if (ScreenScript("ID:IDC_But10,Show:0"))
printf("Screen Script Failed\n");
else
printf("Screen Script Success\n");
}
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.