Text Edit control 'focus'

For general discussion related FlowStone
Post Reply
bryan20miles
Posts: 10
Joined: Thu Oct 07, 2010 4:24 pm

Text Edit control 'focus'

Post by bryan20miles »

Trying to write 'chat' type application using Edit control, etc.
The idea is to type a text message in an input box, have it appear in a scrolling output box.
The issue I'm experiencing is that the button I'm using as a Send button needs to be clicked twice in order to operate (accept the text, etc.). I THINK this is because the first click changes the (Windows) focus from the text input box to the Send button, and the second click actually activates the button (sends trigger pulse).
Alternatively, if I click anywhere off of the text input box before clicking the Send button, it also accepts the text.

So the result of this is that I have to click twice to perform a function I'd like to accomplish using only one click.
Can anyone assist me with my quandry? Would an element to test, report or change Windows focus be useful?
Thanks!

Bryan
Embedded
Posts: 143
Joined: Sat Oct 30, 2010 1:42 pm

Re: Text Edit control 'focus'

Post by Embedded »

Classic FlowStone missing redraw issue. When programming some things you need to first send the data and then redraw the part of the GUI screen with the new data displayed. This doesn't happen automatically when you program things yourself, which is a good thing as you can then optimise the redraws to save on waisted CPU.

Quick solution - in the module where the text is displayed go inside and connect a wire from the String input to the redraw trigger input on the Redraw module, if you can find it. That way every time the text data changes it will also refresh the GUI.
bryan20miles
Posts: 10
Joined: Thu Oct 07, 2010 4:24 pm

Re: Text Edit control 'focus'

Post by bryan20miles »

Thanks Embedded, I'll give it a try!
Post Reply