AllComp
Hello everyone, while making one of my apps I got strangled in an unusual issue, I wasn't able to get the list of all the label components in a screen using blocks. Moreover in certain extensions to change the font of all labels you have to place them manually in the blocks. So I created this masterpiece.
An extension to fetch the components in the code dynamically.
Methods:
GetAllLabelComponents
Returns a list of all Label component objects on the screen.
Return Type: list
GetAllLabels
Returns a list of all Label component names on the screen.
Return Type: list
GetLabelComponentsByNameSubstring
Returns a list of Label component objects that contain the specified string in their names.
Parameter | Type |
---|---|
substring | text |
Return Type: list
GetAllButtonComponents
Returns a list of all Button component objects on the screen.
Return Type: list
GetAllButtons
Returns a list of all Button component names on the screen.
Return Type: list
GetButtonComponentsByNameSubstring
Returns a list of Button component objects that contain the specified string in their names.
Parameter | Type |
---|---|
substring | text |
Return Type: list
GetAllTextBoxComponents
Returns a list of all TextBox component objects on the screen.
Return Type: list
GetAllTextBoxes
Returns a list of all TextBox component names on the screen.
Return Type: list
GetTextBoxComponentsByNameSubstring
Returns a list of TextBox component objects that contain the specified string in their names.
Parameter | Type |
---|---|
substring | text |
Return Type: list
GetAllImageComponents
Returns a list of all Image component objects on the screen.
Return Type: list
GetAllImages
Returns a list of all Image component names on the screen.
Return Type: list
GetImageComponentsByNameSubstring
Returns a list of Image component objects that contain the specified string in their names.
Parameter | Type |
---|---|
substring | text |
Return Type: list
GetAllCheckBoxComponents
Returns a list of all CheckBox component objects on the screen.
Return Type: list
GetAllCheckBoxes
'Returns a list of all CheckBox component names on the screen.
Return Type: list
GetCheckBoxComponentsByNameSubstring
Returns a list of CheckBox component objects that contain the specified string in their names.
Parameter | Type |
---|---|
substring | text |
Return Type: list
GetAllSliderComponents
Returns a list of all Slider component objects on the screen.
Return Type: list
GetAllSliders
Returns a list of all Slider component names on the screen.
Return Type: list
GetSliderComponentsByNameSubstring
Returns a list of Slider component objects that contain the specified string in their names.
Parameter | Type |
---|---|
substring | text |
Return Type: list
GetComponentByName
Returns a component by its name.
Parameter | Type |
---|---|
name | text |
Return Type: component
Support me
I am an independent developer constantly releasing such useful extensions to help the community. It will make my day if you could fund the extension here by clicking the link below
Download the extension
io.allcomp.aix (6.1 KB)
Subscribe for tutorials and more
I would be happy if you can test my extension and give me feedback on the same
It is a completely unique extension on the community and useful to format labels and other components in bulk.
Each component has three methods
- Get All Components: It returns the list of component objects
- Get All: It returns list of component names
- Get All by substring: It returns a list of component objects with the substring
Also if you can remove the previous messages in this post it will look less cluttered
I understand that some of you might not be able to get the usage of the extension
Example if I have to get a list of buttons that contain the substring button
This will apply formatting to these buttons that contain the string button
Hope its clear now
Credits
@Kumaraswamy for helping me out on how to get the components using MIT AI2's library. Though I had made the extension beforehand, I was stuck while compiling as I was using the wrong Method name So silly!
Regards
Sarthak Gupta