WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 11-08-2017, 06:20 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
It's not possible to modify the vizinput dialogs but you could try using vizdlg components instead. With vizdlg, the button labels can be changed. Here's an example:

Code:
import viz
import vizdlg
import viztask

viz.go()

# Function to validate value entered in InputDialog
def checkLength(data):

    if len(data.value) != 6:
        data.error = 'Incorrect length, try again'
        return False
    else:
        return True

# Create an InputDialog object and position it on the screen
dialog = vizdlg.InputDialog(prompt='Enter a value with 6 characters', validate=checkLength, accept='Next', cancel=None)
dialog.setScreenAlignment(viz.ALIGN_CENTER)

def showdialog():
    while True:

        dialog.value = ''
        yield dialog.show()

        if dialog.accepted:
            print 'accepted',dialog.value
        else:
            print 'cancelled'

        yield viztask.waitTime(1)

viztask.schedule(showdialog())
Reply With Quote
 

Tags
vizinput


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 07:43 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC