Avatar billede cbkc. Nybegynder
01. august 2001 - 10:39 Der er 3 kommentarer og
1 løsning

Valgbox i Lotus script

Har glemt hvordan man laver en @prompt box i lotus script. Atlså en boks der indeholder visse forud definerede valgmuligheder.
Er der nogen der hved hvordan dette gøres i script??
Avatar billede roenving Novice
01. august 2001 - 10:59 #1
Hentet i Designer-hjælpen:

Prompt method 

Displays a dialog box and returns a value based on your actions in the dialog box. This method is an interface to the @Prompt function.
Note  This method is new with Release 5.
Defined in
NotesUIWorkspace
Syntax
variant = notesUIWorkspace.Prompt( type%, title$, prompt$, [default ] [, values ] )
Parameters
type%
Constant. Indicates the type of dialog box you want to display. May be any of the following:
PROMPT_OK
PROMPT_YESNO
PROMPT_YESNOCANCEL
PROMPT_OKCANCELEDIT
PROMPT_OKCANCELLIST
PROMPT_OKCANCELCOMBO
PROMPT_OKCANCELEDITCOMBO
PROMPT_OKCANCELLISTMULT
PROMPT_PASSWORD
title$
String. The text you want displayed in the dialog box\'s title bar.
prompt$
String. The text you want displayed within the dialog box.
default
The value that will be used as your default input value. The input section of the dialog box will be primed with the value; you can either accept it by selecting OK or replace it with another value.
The default value(s) for PROMPT_EDIT, PROMPT_LIST, PROMPT_COMBO, PROMPT_EDITCOMBO, and PROMPT_LISTMULT is either a string, a string array, a variant of type string, or a variant array of strings.
values
The values that you want displayed in the dialog box\'s list box. The user can select one of these values as the input.
The values for PROMPT_LIST, PROMPT_COMBO, PROMPT_EDITCOMBO, and PROMPT_LISTMULT is either a string array, a variant of type string, or a variant array of strings.
Return value
Variant of type integer    for PROMPT_OK, PROMPT_YESNO, PROMPT_YESNOCANCEL
Variant of type string    for PROMPT_EDIT, PROMPT_LIST, PROMPT_COMBO, PROMPT_EDITCOMBO, and PROMPT_PASSWORD
Variant Array     for PROMPT_LISTMULT
The return value is a variant containing a string array if you press OK; and Empty if you press Cancel.

hth
jes
Avatar billede charl8 Nybegynder
01. august 2001 - 11:03 #2
Du skal anvende en Inputbox

InputBox[$] ( prompt [ , [ title ] [ , [ default ] [ , xpos , ypos ] ] ] )

Dette skulle virke
Avatar billede cbkc. Nybegynder
01. august 2001 - 12:10 #3
Det duer ikke med inputbox, da den ikke kan holde f.eks 5 valgmuligheder.
Desværre arbejder jeg ikke (endnu) i version 5.
Avatar billede roenving Novice
01. august 2001 - 12:36 #4
Du kan også anvende en dialogboks med et temporært dokument som reference, og lave noget kode à la:

\'Start Dialogboxkode
dim tmpdoc as NotesDocument

set tmpdoc = db.CreateDocument

tmpdoc.Felt = DineVærdier

call ws.DialogBox(\"DialogBoxForm\", true, true, false, false, false, false, \"Vælg en værdi\", tmpdoc)

NyVærdi = tmpdoc.ValgListe(0)
\'Slut Dialogboxkode

I DialogBoxForm (smartest med Layout Region, laver du så et skjult felt markeret som multi-value og så en combobox eller noget (navn: ValgListe), som som reference til værdier har en formel som bare hedder: Felt

hth
jes
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Computerworld tilbyder specialiserede kurser i database-management

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester