I am trying to optionally show either only a textarea, or only an HTMLViewer control in the same space. I have tried changing .left and .visible on the controls to no avail. I have tried placing them in a PagePanel to no avail. The HTMLViewer will usually show; the TextArea simply won’t. I don’t have this problem if I display them in the window non-overlapped.
Gemini suggested a third way could be to make container controls out of each. Anyone know if this will work better? Any forth suggestions on how I might get this to work?
What version of Xojo?
What OS are you working on?
Can you share a simple sample project that shows the problem? (You can zip it and upload to your post)
If the controls have the same dimensions and coordinates, the TextArea might be a child of the HTMLViewer and is being treated as a group. Add this to the TextArea’s Opening event:
me.parent=nil
That will break the parent-child relationship and the controls will be treated as individual elements.
My guess is that the TextArea is a parent of the HTMLViewer. If so, you can place the two controls in different places and move them into the correct position using code.
For the parent-child theory, if the TextArea is a child of the HTMLViewer, you will see a red indication around HTMLViewer when you select the TextArea, like this:
Good that you found your solution. Strange that all else failed.
I’m able to reproduce the problem if one control is child of the other.
Can’t find other way to reproduce.