Apache OpenOffice (AOO) Bugzilla – Issue 4156
Visible / enabel Property of ControllElements do not work
Last modified: 2013-02-24 21:08:14 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
implementation problem
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
s/changes/chances/
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.
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.