函式模組 POPUP TO DECIDE

2021-05-01 03:30:40 字數 1014 閱讀 9243

函式模組:popup_to_decide_list

這個函式模組可以彈出乙個視窗,根據使用者傳入顯示若干個單/多選按鈕,並將使用者選擇返回。

popup_to_decide_list           dialog box for choosing from a list without diagnosis

輸入引數如下:根據名字就可以知道其用處

cursorline:cursor/proposal line radio button line,初始選中的行

mark_flag:selection list with check buttons flag,如果為x,就顯示為核取方塊,否則為單選按鈕

mark_max:maximum allowed number of selections,為核取方塊時最多能選擇的項數,如果超過,則丟擲異常

start_col:column in which the dialog box begins,出現的位置,列

start_row:line in which the popup starts,出現的位置,行

textline1:first text line,必須輸入乙個文字行

textline2:second text line,允許兩個文字行

textline3:third text line,最多三個文字行

titel:popup header line,必須輸入乙個標題

display_only:display only, selection not possible,只顯示,不允許使用者選擇

輸出引數如下:

answer:value for cancel/select option,使用者選的項,a代表使用者按下取消按鈕;如果是單選按鈕,數字表示選中的行號;如果是核取方塊,則不設定這個值,完全考察表引數 t_spopli 的值。

表引數如下:

t_spopli:possible selections,需要列出的選擇行,第乙個欄位是選中標記,第二個是內容,第三個是是否允許選擇,選擇完成後,被選中行的第一列值為x。

8 函式 模組

def functionname parameters 函式 文件字串 function suite return expression python 函式的引數傳遞 引數 匿名函式 python 使用 lambda 來建立匿名函式。全域性變數和區域性變數 定義在函式內部的變數擁有乙個區域性作用域,...

python函式 模組

一 函式 函式是組織好的,可以重複利用,用來實現一定功能的 段。1 函式的組成部分 1 函式 塊以 def 關鍵字開始,後接函式名稱和括號 然後是冒號 2 任何傳入的引數和自變數必須放在 中 3 函式第一行語句可以寫注釋表明函式的功能 4 段,描述了函式實現的功能,需要縮排 5 return 表示式...

python path 函式模組

path 路徑 from os import path 目錄拼接 print path.join abc def hello.py 提取目錄 print path.dirname abc def hello.py 提取檔名 print path.basename abc def hello.py 切...