- This topic has 1 reply, 2 voices, and was last updated 15 years, 6 months ago by Support.
-
AuthorPosts
-
May 12, 2009 at 7:21 pm #32950OldGrumpyParticipant
Hi there,
I'm having a hard time with some dynamic controls. I instantiate a couple of controls dynamically at runtime, and there are five different classes, each of them instantiates a different set of controls. In addition, one of the five is derived from another one of the remaining four. Sounds complex, and it is indeed, that is why I can't just throw a demo program together.
However, when skins are active, creating an object of the derived class causes strange visual effects for all subsequently created objects of the five types. For example: One of the classes instantiates a TsCombobox, and afterwards the font color of the TsCombobox turns into black (windows default?), but the TsSpinEdit from the same class remains unharmed.
Additional instances of the problematic class don't appear at all, whenever I add one of them, there is a slight flicker in the place where it should appear and that's it.
This sounds really strange, and everything seems to work when I disable the skin. Any idea what I could look at to track this one down? FastMM4 doesn't indicate any leaks or access to freed objects or the like, so I'm pretty much out of ideas for the moment.
Could it be that there is a kind of race condition that causes problems when setting properties of the just created controls before the messageloop had been processed? That is basically the only difference I could think of between the four “normal” classes and the fifth one that derives from one of the other four…
May 13, 2009 at 7:09 am #39182SupportKeymasterWho is parent for these new controls?
QUOTE (OldGrumpy @ May 12 2009, 10:21 PM) <{POST_SNAPBACK}>Could it be that there is a kind of race condition that causes problems when setting properties of the just created controls before the messageloop had been processed? That is basically the only difference I could think of between the four “normal” classes and the fifth one that derives from one of the other four…
May be you must implement some conditions, but I can't say more detailed because I have not enough info about your situation. If you can use TeamViewer then may I can connect to your PC and see it by self? It may be a fastest way to solve a problem. -
AuthorPosts
- You must be logged in to reply to this topic.