Textboxes don't work in WinForms

Created at 22 Sep 2019, 01:42
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
eivaremir's avatar

eivaremir

Joined 08.03.2019

Textboxes don't work in WinForms
22 Sep 2019, 01:42


I have made an cBot which shows a simple Windows Form which should enable user input through textboxes and comboboxes but they don't work. I stablish initial values but they dont even appear at runtime

 

They don't enable to write anything... and i have already added the threading code...


        BotToolbox botToolbox;
        private Thread thread;

        [STAThread()]
        protected override void OnStart()
        {

            ThiscBotLabel = GetType().Name;
            NewBuyCycle = pBuy ? true : false;
            NewSellCycle = pSell ? true : false;

            botToolbox = new BotToolbox();
            thread = new Thread(() => { botToolbox.ShowDialog(); });
            thread.SetApartmentState(ApartmentState.STA);
            thread.Start();
            thread.Join();
            while (thread.IsAlive)
                System.Windows.Forms.Application.DoEvents();
        }

Help pls


@eivaremir