What I’m trying to do:
In am studying “custom component” using the cloned “barcode scanner” app. on the fileloader component looks like a button, and I want to give it a consistent look as my other buttons (example “SUBMIT” in the following screencap).
The button has its align property set to “full” which I use to maximize the button width for the mobile device.
What I’ve tried and what’s not working:
I see that in the the file_loader does have a property align but it doesn’t allow “full” (only left, right, center). So am I looking at the wrong direction?
Code Sample:
class Scanner(ScannerTemplate):
def init(self, **properties):
# Set Form properties and Data Bindings.
self.init_components(**properties)
self.file_loader_1.align = ‘full’ #attempt 1
def form_show(self, **event_args):
“”“This method is called when the HTML panel is shown on the screen”""
self.file_loader_1.align = ‘full’ #attempt 2
# Use some custom JS to hint the FileLoader to open the phone camera by default
self.call_js(“initFileLoader”)
Clone link:
share a copy of your app