r***@gmail.com
2007-04-06 17:43:20 UTC
I have a problem that I believe is related to KB839202, but I am more
looking for some sort of work-around, as it appears this is something
Microsoft simply cannot (or will not) fix.
I am building a custom user control that embeds several SWF TextBox
controls onto a scrolling panel. The number of controls need to be
embedded on the control starts out at 3 (the default) but can be
changed by setting NumberOfVisibleInstances Property to a higher or
lower value. I also have an Expanded property that removes the panel
and all textboxes from the control if set to false, and puts them all
back when set to true.
So far, visually, the control seems to work great, it appears
correctly when initially dropped on a design surface, and will appear
correctly in all cases when two properties are changed. However, I am
seeing a very strange behavior if I follow these steps:
1. Drop the control onto a design surface
2. Set Expanded to false (removes panel and all text boxes)
3. Set Expanded back to true (adds panel back and all text boxes)
Now if I hover a mouse over one of the textboxes on my control I don't
get the move cursor. Instead I get an I-Beam cursor. If I click on
the text box, the cursor is placed inside the textbox, and if I type,
the textbox shows the characters I am typing. In short, my control is
active as if it were in run-time. Note that after step 1, even though
I still have panel with three textboxes on it, that the control does
not behave that way. It only behaves that way after I remove the
panel and then re-add it.
I did check the Site property of the Panel and all the TextBox
controls, and sure enough, the Site was null (and so design mode
reports false). I did try setting the Site on the panel and the
textbox controls (so design mode now reports true), but the behavior
above still exists - I still get an I-Beam cursor, I can still click
into the textbox, and I can still enter text into the text box.
All I am really looking for here is a work-around in designmode where
textboxes still look like textboxes. I can set the text boxes to read-
only or enabled=false, but both of these change the textbox so the
backcolor is the same as the color of the panel behind it, and the
textboxes disappear. So far the only hack that I've found that
actually works well is to disable the textbox control and set its
backcolor to white in design mode. But that seems like an unseemly
hack. Does anyone have a more elegant solution?
Thanks for any help you can give.
looking for some sort of work-around, as it appears this is something
Microsoft simply cannot (or will not) fix.
I am building a custom user control that embeds several SWF TextBox
controls onto a scrolling panel. The number of controls need to be
embedded on the control starts out at 3 (the default) but can be
changed by setting NumberOfVisibleInstances Property to a higher or
lower value. I also have an Expanded property that removes the panel
and all textboxes from the control if set to false, and puts them all
back when set to true.
So far, visually, the control seems to work great, it appears
correctly when initially dropped on a design surface, and will appear
correctly in all cases when two properties are changed. However, I am
seeing a very strange behavior if I follow these steps:
1. Drop the control onto a design surface
2. Set Expanded to false (removes panel and all text boxes)
3. Set Expanded back to true (adds panel back and all text boxes)
Now if I hover a mouse over one of the textboxes on my control I don't
get the move cursor. Instead I get an I-Beam cursor. If I click on
the text box, the cursor is placed inside the textbox, and if I type,
the textbox shows the characters I am typing. In short, my control is
active as if it were in run-time. Note that after step 1, even though
I still have panel with three textboxes on it, that the control does
not behave that way. It only behaves that way after I remove the
panel and then re-add it.
I did check the Site property of the Panel and all the TextBox
controls, and sure enough, the Site was null (and so design mode
reports false). I did try setting the Site on the panel and the
textbox controls (so design mode now reports true), but the behavior
above still exists - I still get an I-Beam cursor, I can still click
into the textbox, and I can still enter text into the text box.
All I am really looking for here is a work-around in designmode where
textboxes still look like textboxes. I can set the text boxes to read-
only or enabled=false, but both of these change the textbox so the
backcolor is the same as the color of the panel behind it, and the
textboxes disappear. So far the only hack that I've found that
actually works well is to disable the textbox control and set its
backcolor to white in design mode. But that seems like an unseemly
hack. Does anyone have a more elegant solution?
Thanks for any help you can give.