Click here to Skip to main content
15,903,831 members
Home / Discussions / C#
   

C#

 
GeneralRe: disable datagrid column width adjustment at runtime Pin
salon6-Mar-07 20:28
salon6-Mar-07 20:28 
AnswerRe: disable datagrid column width adjustment at runtime Pin
sam#6-Mar-07 19:55
sam#6-Mar-07 19:55 
GeneralRe: disable datagrid column width adjustment at runtime Pin
salon6-Mar-07 20:00
salon6-Mar-07 20:00 
GeneralRe: disable datagrid column width adjustment at runtime Pin
sam#6-Mar-07 20:03
sam#6-Mar-07 20:03 
GeneralRe: disable datagrid column width adjustment at runtime Pin
salon6-Mar-07 20:04
salon6-Mar-07 20:04 
GeneralRe: disable datagrid column width adjustment at runtime Pin
sam#6-Mar-07 20:12
sam#6-Mar-07 20:12 
GeneralRe: disable datagrid column width adjustment at runtime Pin
salon6-Mar-07 20:21
salon6-Mar-07 20:21 
GeneralRe: disable datagrid column width adjustment at runtime Pin
sam#6-Mar-07 20:32
sam#6-Mar-07 20:32 
GeneralRe: disable datagrid column width adjustment at runtime Pin
salon6-Mar-07 21:03
salon6-Mar-07 21:03 
GeneralRe: disable datagrid column width adjustment at runtime Pin
sam#6-Mar-07 21:18
sam#6-Mar-07 21:18 
AnswerRe: disable datagrid column width adjustment at runtime Pin
Keshav V. Kamat6-Mar-07 20:30
Keshav V. Kamat6-Mar-07 20:30 
GeneralRe: disable datagrid column width adjustment at runtime Pin
salon6-Mar-07 20:37
salon6-Mar-07 20:37 
GeneralRe: disable datagrid column width adjustment at runtime Pin
Keshav V. Kamat6-Mar-07 21:15
Keshav V. Kamat6-Mar-07 21:15 
GeneralRe: disable datagrid column width adjustment at runtime Pin
salon6-Mar-07 22:02
salon6-Mar-07 22:02 
QuestionTabbed Notepad Pin
64-bit6-Mar-07 16:20
64-bit6-Mar-07 16:20 
QuestionDataBindings Save Pin
smarttom996-Mar-07 15:38
smarttom996-Mar-07 15:38 
AnswerRe: DataBindings Save Pin
sam#6-Mar-07 20:01
sam#6-Mar-07 20:01 
GeneralRe: DataBindings Save Pin
smarttom997-Mar-07 5:13
smarttom997-Mar-07 5:13 
GeneralRe: DataBindings Save Pin
smarttom997-Mar-07 5:13
smarttom997-Mar-07 5:13 
QuestionProblems with Reading Data from Serial Port (from .NET 2.0 framework) Pin
kmkimlo6-Mar-07 15:34
kmkimlo6-Mar-07 15:34 
AnswerRe: Problems with Reading Data from Serial Port (from .NET 2.0 framework) Pin
PS@Codeproj6-Mar-07 19:33
PS@Codeproj6-Mar-07 19:33 
AnswerRe: Problems with Reading Data from Serial Port (from .NET 2.0 framework) Pin
pbraun7-Mar-07 3:12
pbraun7-Mar-07 3:12 
Questionhaving user thread update listViewItem.BackColor Pin
yccheok6-Mar-07 13:46
yccheok6-Mar-07 13:46 
Hello all,

I try to have user thread to perform update on the window form list
view item back color. However, I can see the new item was added each
time. However, the back color just not changed until I move the window
around. May I noe what code I had missing out?

Thank you very much!

delegate void OnGUIDelegate(int msgID, object param1, object
param2);
public void OnGUI(int msgID, object param1, object param2)
{
// Make sure we're on the right thread
if(listView1.InvokeRequired == false)
{
switch(msgID)
{
case GUIMessage.MSG_ERR:
if(param1 is string)
{
string strDate = DateTime.Now.ToLongTimeString();
string[] s = {strDate, (string)param1};

ListViewItem listViewItem = new ListViewItem(s);
listViewItem.StateImageIndex = 2;
listViewItem.BackColor = Color.FromArgb(255, 224, 192);

listView1.Items.Add(listViewItem);
isSave = false;
}
break;

case GUIMessage.MSG_INFO:
if(param1 is string)
{
string strDate = DateTime.Now.ToLongTimeString();
string[] s = {strDate, (string)param1};

ListViewItem listViewItem = new ListViewItem(s);
listViewItem.StateImageIndex = 0;
listViewItem.BackColor = Color.FromArgb(192, 255, 192);

listView1.Items.Add(listViewItem);
isSave = false;
}
break;

case GUIMessage.MSG_WARNING:
if(param1 is string)
{
string strDate = DateTime.Now.ToLongTimeString();
string[] s = {strDate, (string)param1};

ListViewItem listViewItem = new ListViewItem(s);
listViewItem.StateImageIndex = 1;
listViewItem.BackColor = Color.FromArgb(255, 255, 192);

listView1.Items.Add(listViewItem);
isSave = false;
}
break;
} // switch
}
else
{
// Update GUI asynchronously
OnGUIDelegate onGUI =
new OnGUIDelegate(OnGUI);
this.BeginInvoke(onGUI,
new object[] { msgID, param1, param2});
}
}
Questionhow to increase the height of the Row in ListView? Pin
Khoramdin6-Mar-07 13:04
Khoramdin6-Mar-07 13:04 
AnswerRe: how to increase the height of the Row in ListView? Pin
Ravi Bhavnani6-Mar-07 17:11
professionalRavi Bhavnani6-Mar-07 17:11 

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.