omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    Change background color in the dialogs form?

    Pythonista
    3
    4
    3141
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • david
      david last edited by

      Hi,
      can it be changed the background color in the dialogs form?

      Best regards.

      1 Reply Last reply Reply Quote 0
      • omz
        omz last edited by

        That's currently not supported, sorry. If you really need this, feel free to look at the source code of the dialogs module – it's all just Python…

        1 Reply Last reply Reply Quote 0
        • david
          david last edited by

          working on it... thank you!

          cvp 1 Reply Last reply Reply Quote 0
          • cvp
            cvp @david last edited by

            @david

            monkey patch of a module that you are sure it will be called after creation of the tableview of dialog fields (in my poor English)

            import ui
            import dialogs
            
            def my_tableview_cell_for_row(self, tv, section, row):
            	if self.view.background_color != 'blue':
            		self.view.background_color = 'blue'
            	return self.cells[section][row]
            
            dialogs._FormDialogController.tableview_cell_for_row = my_tableview_cell_for_row
            
            fields = [{'title':'title1','type':'text','value':''}, {'title':'title2','type':'text','value':''}]
            f = dialogs.form_dialog(title='dialog title', done_button_title='ok',fields=fields, sections=None)
            
            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Powered by NodeBB Forums | Contributors