Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a defautl style attribute in FormView #1

Open
kinderp opened this issue Aug 9, 2019 · 0 comments
Open

Add a defautl style attribute in FormView #1

kinderp opened this issue Aug 9, 2019 · 0 comments
Labels
enhancement New feature or request

Comments

@kinderp
Copy link
Owner

kinderp commented Aug 9, 2019

When a lot of items in self.styles share the same style commands (e.g. locations, start_and_end_date_parts, available_languages) it could be useful a __default item
to apply the same style in only one command.

        self.styles = {
            'event_name_and_session_id': {
                'style': 'Normal',
                'space': 4.5,
                'commands': [
                                ('alignment', TA_CENTER),
                                ('fontName', 'Helvetica'),
                                ('fontSize', 18),
                            ]
            },
            'vendor': {
                'style': 'Normal',
                'commands': [
                                ('alignment', TA_CENTER),
                                ('fontSize', 12),
                            ],
                'space': 4.5,
            },
            'start_and_end_date_parts': {
                'style': 'Normal',
                'commands': [
                                ('alignment', TA_LEFT),
                                ('fontSize', 8),
                            ]
            },
            'locations': {
                'style': 'Normal',
                'commands': [
                                ('alignment', TA_LEFT),
                                ('fontSize', 8),
                            ]
            },
            'available_languages':{
                'style': 'Normal',
                'commands': [
                                ('alignment', TA_LEFT),
                                ('fontSize', 8),
                            ]
            }
        }

Take a look at render() function in form_view.FormView

@kinderp kinderp added the enhancement New feature or request label Aug 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant