Gnm.Validation¶
Fields¶
Name |
Type |
Access |
Description |
|---|---|---|---|
allow_blank |
r/w |
||
deps |
r/w |
||
msg |
r/w |
||
op |
r/w |
||
ref_count |
r/w |
||
style |
r/w |
||
title |
r/w |
||
type |
r/w |
||
use_dropdown |
r/w |
Methods¶
class |
|
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- class Gnm.Validation¶
- classmethod eval(wbc, mstyle, sheet, pos)¶
- Parameters:
wbc (
Gnm.WorkbookControl) –mstyle (
Gnm.Style) –sheet (
Gnm.Sheet) –pos (
Gnm.CellPos) –
- Return type:
(
Gnm.ValidationStatus, showed_dialog:bool)
Checks the validation in mstyle, if any. Set showed_dialog to
Trueif a dialog was showed as a result.
- classmethod eval_range(wbc, sheet, pos, r, showed_dialog)¶
- Parameters:
wbc (
Gnm.WorkbookControl) –sheet (
Gnm.Sheet) –pos (
Gnm.CellPos) –r (
Gnm.Range) –showed_dialog (
bool) –
- Return type:
- classmethod new(style, type, op, sheet, title, msg, texpr0, texpr1, allow_blank, use_dropdown)¶
- Parameters:
style (
Gnm.ValidationStyle) – #ValidationStyletype (
Gnm.ValidationType) –op (
Gnm.ValidationOp) – #ValidationOptitle (
str) – will be copied.msg (
str) – will be copied.texpr0 (
Gnm.ExprToporNone) – first expressiontexpr1 (
Gnm.ExprToporNone) – second expressionallow_blank (
bool) –use_dropdown (
bool) –
- Returns:
a new GnmValidation object
- Return type:
Does _NOT_ require all necessary information to be set here.
Gnm.Validation.set_exprcan be used to change the expressions after creation, andGnm.Validation.is_okcan be used to ensure that things are properly setup.
- equal(b, relax_sheet)¶
- Parameters:
b (
Gnm.Validation) –relax_sheet (
bool) –
- Return type:
- is_ok()¶
- Return type:
- ref()¶
- Return type:
- set_expr(texpr, indx)¶
- Parameters:
texpr (
Gnm.ExprTop) –Gnm.ExprTopindx (
int) – 0 or 1
Assign an expression to a validation.
Gnm.Validation.is_okcan be used to verify that self has all of the required information.
- unref()¶