|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Some Trouble with SSTAB and ComboBoxesHello,
I have some User Forms with SSTab-Controls and ComboBoxes on it. My problem is: When I change the TAB´s, in each of the comboBoxes the selected Item appears highlighted, like after the User had selected it and before leaving the control. Is there any way to avoid this? I think, I had seen a solution anywhere, but this evening Google ist not my friend at all. Thank you in advance. Karl "Karl Fuchs" <f***@ivsn.com> wrote I have some User Forms with SSTab-Controls and ComboBoxes on it. Myproblem is: When I change the TAB´s, in each of the comboBoxes the selected Item appears highlighted, like after the User had selected it and before leaving the control. Is there any way to avoid this? I think, I had seen a solution anywhere, but this evening Google ist not my friend at all. --- What response do you want them to have? When you "change the TAB's", you might go through and set all the ListIndex values of the comboboxes to -1, meaning nothing is selected.... LFS Hello,
> thank you, but this is not the problem... The value should not be> What response do you want them to have? > > When you "change the TAB's", you might go through and set all > the ListIndex values of the comboboxes to -1, meaning nothing is > selected.... > > LFS changed, but the selected Item should not be highlighted. Meanwhile I found out, that this is a problem of SSTAB Control; one solution is, to place the controls of each TAB in a frame. At the moment I search for a solution using SendMessage with CB_SETEDITSEL; however part of the Items of Comboboxes sometimes are still highlighted, if the selected Item has more than 18 characters. But I think, this will be another thread ... Karl
Show quote
>> What response do you want them to have? I'm not exactly sure where you should place this given what I think you are >> >> When you "change the TAB's", you might go through and set all >> the ListIndex values of the comboboxes to -1, meaning nothing is >> selected.... >> >> LFS > > thank you, but this is not the problem... The value should not be > changed, but the selected Item should not be highlighted. > Meanwhile I found out, that this is a problem of SSTAB Control; one > solution is, to place the controls of each TAB in a frame. At the > moment I search for a solution using SendMessage with CB_SETEDITSEL; > however part of the Items of Comboboxes sometimes are still > highlighted, if the selected Item has more than 18 characters. > But I think, this will be another thread ... describing; however, you can force the highlight in a ComboBox to be off by executing this line... Combo1.SelStart = Len(Combo1.Text) Off the top of my head (meaning... I didn't try it out), perhaps you can set up a "User Form" wide flag variable and set it to True when a new tab is selected and then put this in each of your ComboBox GotFocus events... If FlagVariable = True Then ComboX.SelStart = Len(ComboX.Text) FlagVariable = False Else ' ' Your actual ComboBox code goes here ' End If where ComboX is the name of the ComboBox into whose GotFocus event the code is placed. Rick |
|||||||||||||||||||||||