WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Thread Tools Rate Thread Display Modes
Old 11-03-2017, 08:59 AM
bernie bernie is offline
Join Date: May 2007
Posts: 18
Changing label of confirmation button from "OK" to "Next"?

Is there any way to change the label on the confirmation button when using a vizinput.choose() and vizinput.message() from the default "OK" to something different, such as "Next"?
We might need that to get approval for using this code in a specific application environment...
Reply With Quote
Old 11-07-2017, 02:21 PM
bernie bernie is offline
Join Date: May 2007
Posts: 18
any feedback from Worldviz please? Even a simple "yes" or "no" would be useful. thanks in advance!
Reply With Quote
Old 11-08-2017, 06:20 AM
Jeff Jeff is offline
WorldViz Team Member
Join Date: Aug 2008
Posts: 2,467
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:

import viz
import vizdlg
import viztask


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

    if len(data.value) != 6:
        data.error = 'Incorrect length, try again'
        return False
        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)

def showdialog():
    while True:

        dialog.value = ''

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

        yield viztask.waitTime(1)

Reply With Quote


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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 01:32 PM.

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