Focus events

Hi,

I have found the reason why they are not firing in another thread but wondering what the proposed workaround would be to get the desired effect would be.

Basically, I have an SFComboBox which is down as 'Editable=False' as I don't want the users typing in to find the item (there are only two to pick from...) and I want to be able to change the border colour whilst they are looking at the list and then when they select the item they want to change the border colour back to the original one. I have this set using your Entry control. Whilst the user types in it the border changes to orange, when they stop/move on to another control I change it to grey.

I know the focus event isn't fired when 'Editable' is set to false so how do you suggest I workaround this using your controls?

Thanks,

Dave


1 Reply

SS Suganya Sethuraman Syncfusion Team September 27, 2021 05:21 AM UTC

Hi Dave,

Greetings from Syncfusion.

We have analyzed your requirement. We have achieved your requirement by using SelectionChnaged event as shown in the following code snippet,

Code snippet
 
        private void cmbFavList_SelectionChanged(object sender, Syncfusion.XForms.ComboBox.SelectionChangedEventArgs e) 
        { 
                                           cmbFavList.BorderColor = Color.Gray; 
        } 

Please have a sample for your reference,

Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/ComboBoxSampleBorder-1931488480

Please check if the sample satisfies your requirement and let us know if you have any concerns.

Regards,
Suganya Sethuraman.
 


Loader.
Up arrow icon