LS
I would like to see a way to finding controls on forms. We have a lot of code with calls to controls (controls.) but cannot find the controls easy on the form (they are on lots of tab controls). Exceeding the find functionality with 'find control' would come in handy.
Kind Regards, Harry
finding controls
Moderators: Jon, Steve, Ian, Dave
-
- Ebase User
- Posts: 118
- Joined: Tue Oct 23, 2012 7:01 am
- Location: The Netherlands
-
- Ebase User
- Posts: 118
- Joined: Tue Oct 23, 2012 7:01 am
- Location: The Netherlands
finding controls (extended)
LS,
Also it would be nice to have a search function to search in multiple scripts. To know in which scripts a control is used.
Kind regards, Harry
Also it would be nice to have a search function to search in multiple scripts. To know in which scripts a control is used.
Kind regards, Harry
0 x
Kind regards,
Harry
Harry
-
- Ebase User
- Posts: 37
- Joined: Wed Mar 13, 2013 11:33 am
- Contact:
If you're using JavaScript (not FPL) for your scripts and you want to find multiple controls at once you can do this really easily. In the properties panel for a control (e.g. the properties for a panel or field), look for the 'Modifiers' property. For each of the controls that you want to do something to in a script, give them the same modifier. Then in your script you can use something similar to:
For example, on a page i have several panels with the Modifier 'hideOnPageReturn' and in a before page script i have:
Also, if you are writing your scripts in JavaScript; in a script type in controls. (with the fullstop) and press ctrl + space, it will then give you a list of all the controls on the form
Hope this helps,
Luke
Code: Select all
for each (var ctrl in pages.PAGE_NAME.getControlsByModifier("modifierNameYouChose")){
// so for each control found on the page selected with the modifier above, do something to it:
ctrl.show();
ctrl.setCssClass("class1");
}
For example, on a page i have several panels with the Modifier 'hideOnPageReturn' and in a before page script i have:
Code: Select all
for each (var ctrl in pages.PAGE_1.getControlsByModifier("hideOnPageReturn")){
ctrl.hide();
}
Also, if you are writing your scripts in JavaScript; in a script type in controls. (with the fullstop) and press ctrl + space, it will then give you a list of all the controls on the form
Hope this helps,
Luke
0 x
-
- Ebase User
- Posts: 118
- Joined: Tue Oct 23, 2012 7:01 am
- Location: The Netherlands
Hi Luke,
We use js and are aware of the techniques you describe, however that's not what I mean. If you have a lot of scripts I want to find in which script(s) and on what line(s) the control is mentioned. The first question was to find a control in a form (or outline) by its name.
Regards, Harry
We use js and are aware of the techniques you describe, however that's not what I mean. If you have a lot of scripts I want to find in which script(s) and on what line(s) the control is mentioned. The first question was to find a control in a form (or outline) by its name.
Regards, Harry
0 x
Kind regards,
Harry
Harry
Who is online
Users browsing this forum: No registered users and 0 guests