TControl:Hide() works but only if you call it after the TDialog has been activated. I wanted to include some TButtons that were hidden from the start. Is there a way of doing this?
As a reasonable workaround I figured I could call a function to hide these buttons when the TDialog was activated (like an ONINIT option). However I discovered that whilst TControl has a bInit DATA, the bInit code block is not called on Activation but is called on the resize event. This may mean that it would be called if the TDialog was activated MAXIMISED or CENTERED - I haven't tested for that. It isn't called if the TDialog is merely activated. There is code so that bInit can only be called once so I presume it was intended to be called when the TDialog is activated.
I did get things going by adding a bStartUp DATA and inserting the following code into TDialog:Activate() after ::Show() and before ::WinRun()
Code: Select all
IF ::bStartUp != nil
EVAL( ::bStartUp )
ENDIF
Regards
Doug
(xProgrammer)