Issue 4156 - Visible / enabel Property of ControllElements do not work
Summary: Visible / enabel Property of ControllElements do not work
Status: CLOSED NOT_AN_OOO_ISSUE
Alias: None
Product: App Dev
Classification: Unclassified
Component: api (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: PC Windows 2000
: P3 Trivial
Target Milestone: ---
Assignee: Frank Schönheit
QA Contact: issues@api
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-04-21 14:00 UTC by Oliver Brinzing
Modified: 2013-02-24 21:08 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Oliver Brinzing 2002-04-21 14:00:05 UTC
Hi,

I tried changing the visible/enabel flag of a formelement (Button) with
StarBasic on sheet 1 like this:

...
oController = oDocument.CurrentController.GetControl(oControlModel)
oController.SetEnable(False) / oController.SetVisible (False)

It works, but when I go to the next sheet, and than come back to sheet1
the Button is again enabled / visible ...

It seems that I can change the enable / visible property only as long as I do not
change between sheets ...

regards

Oliver
Comment 1 ooo 2002-04-22 12:06:15 UTC
implementation problem
Comment 2 Frank Schönheit 2002-04-22 12:56:22 UTC
Oliver,

your code changes the property on the control, not on the model. The
control is updated from it's model's properties from time to time (in
Calc obviously when switching sheets), so the change you do is
overridden then.
For a permanent change, you need to set the model property "Enabled".
There is no respective property for the visibility - for this, you
would need to add an XWindowListener to the control or it's peer to
reset the visibility flag every time needed.
For a deeper discussion about the involved architecture
(model-view-paradigm and such) I'd like to invite you to dev@gsl or
dev@dba (the former would be the right choice, the latter has higher
changes to produce answers :)

Frank
Comment 3 Frank Schönheit 2002-04-22 18:02:59 UTC
s/changes/chances/
Comment 4 michael.bemmer 2003-03-12 14:17:58 UTC
As mentioned on the qa dev list on March 5th I will close all resolved
<wontfix/duplicate/worksforme/invalid> issues. Please see this posting for
details. First step in IssueZilla is unfortunately to set them to verified.
Comment 5 michael.bemmer 2003-03-12 14:18:25 UTC
As mentioned on the qa dev list on March 5th I will close all resolved
<wontfix/duplicate/worksforme/invalid> issues. Please see this posting for
details. First step in IssueZilla is unfortunately to set them to verified.
Comment 6 michael.bemmer 2003-03-12 14:36:10 UTC
As mentioned on the qa dev list on March 5th I will close all resolved
<wontfix/duplicate/worksforme/invalid> issues. Please see this posting for details. 
Comment 7 michael.bemmer 2003-03-12 14:36:34 UTC
As mentioned on the qa dev list on March 5th I will close all resolved
<wontfix/duplicate/worksforme/invalid> issues. Please see this posting for details.