TGUI Forum

General Category => General Discussion => Topic started by: billarhos on 13 November 2015, 20:13:19

Title: focus on disabled widgets
Post by: billarhos on 13 November 2015, 20:13:19
Hi

Should focus override  disabled widgets?
Title: Re: focus on disabled widgets
Post by: texus on 13 November 2015, 20:15:38
I'm not sure what you are asking exactly, but disabled widgets cannot be focused.
Title: Re: focus on disabled widgets
Post by: billarhos on 13 November 2015, 20:24:26
Yes they can.

example:
pEditBox->disable(); // set disable

bool enabled = pEditBox->isEnabled(); // this is false

pEditBox->focus(); //now i can edit in editbox
Title: Re: focus on disabled widgets
Post by: texus on 13 November 2015, 20:27:50
Indeed, that shouldn't happen.
I only tried it with clicking on the widget and by using the tab key, I didn't try with calling the focus function manually before.
I'll fix this later today or tomorrow so that the edit box (and other widgets) don't get focused.
Title: Re: focus on disabled widgets
Post by: texus on 13 November 2015, 23:13:46
Focusing a disabled widget now no longer works with the latest github version.