is_locked Eigentum

is_locked Eigentum

„True“ bedeutet, dass das Objekt nicht geändert werden kann, wenn das Blatt geschützt ist. Beachten Sie, dass dieser Wert nur dann sinnvoll ist, wenn das Arbeitsblatt oder die Objekte im Arbeitsblatt geschützt sind.

Beispiel


# Sets the specified shape to unlocked state
if shape.worksheet.is_protected and shape.is_locked:
    shape.is_locked = False
# Sets the specified shape to a locked state
if shape.worksheet.is_protected and notshape.is_locked:
    shape.is_locked = True

Definition:

@property
def is_locked(self):
    ...
@is_locked.setter
def is_locked(self, value):
    ...

Siehe auch