Click here to Skip to main content
15,919,749 members
Home / Discussions / C#
   

C#

 
QuestionWhy isn't my semi-editable ComboBox drawing the text in gray when the dropdown list isn't showing? Pin
arnold_w10-Jan-23 2:25
arnold_w10-Jan-23 2:25 
AnswerRe: Why isn't my semi-editable ComboBox drawing the text in gray when the dropdown list isn't showing? Pin
OriginalGriff10-Jan-23 3:46
mveOriginalGriff10-Jan-23 3:46 
GeneralRe: Why isn't my semi-editable ComboBox drawing the text in gray when the dropdown list isn't showing? Pin
arnold_w10-Jan-23 4:06
arnold_w10-Jan-23 4:06 
GeneralRe: Why isn't my semi-editable ComboBox drawing the text in gray when the dropdown list isn't showing? Pin
Ralf Meier10-Jan-23 4:55
mveRalf Meier10-Jan-23 4:55 
GeneralRe: Why isn't my semi-editable ComboBox drawing the text in gray when the dropdown list isn't showing? Pin
arnold_w10-Jan-23 5:21
arnold_w10-Jan-23 5:21 
GeneralRe: Why isn't my semi-editable ComboBox drawing the text in gray when the dropdown list isn't showing? Pin
Ralf Meier10-Jan-23 6:14
mveRalf Meier10-Jan-23 6:14 
AnswerRe: Why isn't my semi-editable ComboBox drawing the text in gray when the dropdown list isn't showing? Pin
Pete O'Hanlon12-Jan-23 0:03
mvePete O'Hanlon12-Jan-23 0:03 
GeneralRe: Why isn't my semi-editable ComboBox drawing the text in gray when the dropdown list isn't showing? Pin
arnold_w12-Jan-23 2:29
arnold_w12-Jan-23 2:29 
Yes, that was it!!! Thank you. The beginning of my comboBox_TextChanged method now looks like this:
C#
private void comboBox_TextChanged(object sender, EventArgs e)
{
    int selectedIndex = comboBox.SelectedIndex;  // When we edit the currently shown text, then comboBox.SelectedIndex becomes -1!
    if (0 <= selectedIndex)
    {
        currentlySelectedIndex = selectedIndex;
    }
    bool enableItem = (selectedIndex < 0) ? false : items[selectedIndex].enabled;
    comboBox.ForeColor = enableItem ? Color.Black : Color.Gray;

GeneralRe: Why isn't my semi-editable ComboBox drawing the text in gray when the dropdown list isn't showing? Pin
Pete O'Hanlon12-Jan-23 2:55
mvePete O'Hanlon12-Jan-23 2:55 
Questionproblem using ... "nested" DLL's ... a DLL referenced inside another DLL ? Pin
BillWoodruff8-Jan-23 21:30
professionalBillWoodruff8-Jan-23 21:30 
AnswerRe: problem using ... "nested" DLL's ... a DLL referenced inside another DLL ? Pin
Richard Deeming8-Jan-23 22:09
mveRichard Deeming8-Jan-23 22:09 
GeneralRe: problem using ... "nested" DLL's ... a DLL referenced inside another DLL ? Pin
BillWoodruff9-Jan-23 0:31
professionalBillWoodruff9-Jan-23 0:31 
GeneralRe: problem using ... "nested" DLL's ... a DLL referenced inside another DLL ? Pin
Richard Deeming9-Jan-23 0:45
mveRichard Deeming9-Jan-23 0:45 
GeneralRe: problem using ... "nested" DLL's ... a DLL referenced inside another DLL ? Pin
BillWoodruff9-Jan-23 2:10
professionalBillWoodruff9-Jan-23 2:10 
GeneralRe: problem using ... "nested" DLL's ... a DLL referenced inside another DLL ? Pin
Richard Deeming9-Jan-23 2:26
mveRichard Deeming9-Jan-23 2:26 
GeneralRe: problem using ... "nested" DLL's ... a DLL referenced inside another DLL ? Pin
BillWoodruff9-Jan-23 2:42
professionalBillWoodruff9-Jan-23 2:42 
AnswerRe: problem using ... "nested" DLL's ... a DLL referenced inside another DLL ? Pin
OriginalGriff8-Jan-23 22:19
mveOriginalGriff8-Jan-23 22:19 
GeneralRe: problem using ... "nested" DLL's ... a DLL referenced inside another DLL ? Pin
BillWoodruff9-Jan-23 0:38
professionalBillWoodruff9-Jan-23 0:38 
AnswerRe: problem using ... "nested" DLL's ... a DLL referenced inside another DLL ? Pin
BillWoodruff9-Jan-23 2:55
professionalBillWoodruff9-Jan-23 2:55 
QuestionInsert data on dynamic textbox windows form C# Pin
Hoang Luc2-Jan-23 17:48
Hoang Luc2-Jan-23 17:48 
AnswerRe: Insert data on dynamic textbox windows form C# Pin
OriginalGriff2-Jan-23 18:50
mveOriginalGriff2-Jan-23 18:50 
SuggestionRe: Insert data on dynamic textbox windows form C# Pin
Richard Deeming4-Jan-23 23:50
mveRichard Deeming4-Jan-23 23:50 
QuestionSecuring a Named Pipe Pin
Richard Andrew x641-Jan-23 6:13
professionalRichard Andrew x641-Jan-23 6:13 
AnswerRe: Securing a Named Pipe Pin
BillWoodruff2-Jan-23 0:46
professionalBillWoodruff2-Jan-23 0:46 
GeneralRe: Securing a Named Pipe Pin
Richard Andrew x642-Jan-23 0:54
professionalRichard Andrew x642-Jan-23 0:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.