Recent

Author Topic: UniqueInstance: how to init Enabled  (Read 1485 times)

AlexTP

  • Hero Member
  • *****
  • Posts: 2680
    • UVviewsoft
UniqueInstance: how to init Enabled
« on: October 14, 2015, 07:42:51 pm »
Thanks to Luiz Americo: now I use it at CudaText 
Good thing!

I have prob: I dont know WHEN to initiialize Enabled. If I do it on options reading of app 
it's too late [app don't use UniqInst]. I placed component on form, set Enabled=false.When to set True?
« Last Edit: October 14, 2015, 07:45:50 pm by Alextp »

aradeonas

  • Hero Member
  • *****
  • Posts: 824
Re: UniqueInstance: how to init Enabled
« Reply #1 on: October 14, 2015, 08:14:03 pm »
I dont know what is the problem exactly but I create it in the form create and enabled it right there and set the event before everything else  and then go for all other things like reading options.

AlexTP

  • Hero Member
  • *****
  • Posts: 2680
    • UVviewsoft
Re: UniqueInstance: how to init Enabled
« Reply #2 on: October 14, 2015, 08:40:46 pm »
You set it on FormCreate, i set it on FormShow. now I do this: on Formshow I set Enabled;
and

  //type TComponentHack=class(TComponent)
  TComponentHack(UniqInst1).Loaded;

so solved.

aradeonas

  • Hero Member
  • *****
  • Posts: 824
Re: UniqueInstance: how to init Enabled
« Reply #3 on: October 14, 2015, 08:53:50 pm »
Very good.

 

TinyPortal © 2005-2018