View Full Version : Label issues -- can't clear Anchor or Text

09-28-2011, 04:21 PM
I wanted a destination label which would update if the user browsed and chose a new folder (in addition to have the back-end property change). I tried emulating how it is setup in the standard BrowseStageFolder page, with the [ISRootStagePath] label -- this has blank text and is tied to a property, so I assume it would update on the fly if the property changes. I tried copying that label to my new dialog, but the Text field gets populated, and even if I clear the text, it remains tied to a blank string entry which overrides using the property for the display text. Is there any workaround for this?

Similarly (this applies to all controls I think, not just labels), if you turn on any of the anchors, and then later try to clear them, the last one cannot be disabled. It looked like deleting the text ("Move X" for instance) did the trick, but then when i switched dialogs and came back, the anchor was turned back on. Do I need to delete the label and start over to avoid this problem, or is there some way to successfully nullify the anchors again?

09-29-2011, 10:43 AM
Sounds like a bug with the way anchors are handled :( I've submitted Workorder IOA-000065850 to track this issue in the future. I can't really say when we'll have a chance to get a fix for this out. You are correct that this affects all controls equally.

Fortunately, the new project format is pretty flexible and easy to edit on your own, so to resolve the issue, you can manually modify the project file if you'd rather not delete and re-create the control. To do this, open the suite project in a text editor and look in the XML for your specific control. For example, if you had a control named IDC_LABEL1 on the InstallationLanguage page, you'd look for something like this:

<Page Name="InstallationLanguage" ...>
<Label Name="IDC_LABEL1" Position="21,11,358,10" Text="IDS_INSTALLATION_LANGUAGE_DIRECTIONS" Anchor="SIZE_X"/>

Then, remove or clear the "Anchor" attribute so it looks as such:

<Label Name="IDC_LABEL1" Position="21,11,358,10" Text="IDS_INSTALLATION_LANGUAGE_DIRECTIONS"/>

09-29-2011, 11:12 AM
Thanks Bryan. I'm fine with editing the xml in the .issuite file as a workaround for this. Seems like it will be a good idea to become familiar with the structure of the project file (and which pieces can be safely tampered with) going forward in any case.