Modifying the Listbox Control

  • Thread starter Thread starter Thiago A.
  • Start date Start date
T

Thiago A.

Hi,

I was wondering if I can modify the listbox control using all the properties and methos of the default listbox control, BUT,
placing an image on the right of the display text.

Any ideas?

thanks!
 
hi,

thanks for the tip... but i cant use others components.
any ideia of how to implement this image on the right side of each listbox element?

thanks!
Smart Devices Framework (SDK) includes the owner-drawn listbox that would that:

http://www.opennetcf.org/smartdeviceframework.asp

or here:
http://blog.opennetcf.org/ayakhnin/PermaLink.aspx/40f8d4c0-26ae-4d02-af0b-0c80de605288

--
Alex Yakhnin .NET CF MVP
www.intelliprog.com | www.opennetcf.org
Hi,

I was wondering if I can modify the listbox control using all the properties and methos of the default listbox control, BUT,
placing an image on the right of the display text.

Any ideas?

thanks!
 
Odd. If you have all the source and it's free, why can't you use it? Do you have some restriction that forces you to do things the long way?

--
Chris Tacke, eMVP
Co-Founder and Advisory Board Member
www.OpenNETCF.org
---
Windows CE Product Manager
Applied Data Systems
www.applieddata.net


hi,

thanks for the tip... but i cant use others components.
any ideia of how to implement this image on the right side of each listbox element?

thanks!
Smart Devices Framework (SDK) includes the owner-drawn listbox that would that:

http://www.opennetcf.org/smartdeviceframework.asp

or here:
http://blog.opennetcf.org/ayakhnin/PermaLink.aspx/40f8d4c0-26ae-4d02-af0b-0c80de605288

--
Alex Yakhnin .NET CF MVP
www.intelliprog.com | www.opennetcf.org
Hi,

I was wondering if I can modify the listbox control using all the properties and methos of the default listbox control, BUT,
placing an image on the right of the display text.

Any ideas?

thanks!
 
Hi dood,

I am trying the following code...

public class TextBox2 : System.Windows.Forms.TextBox

{

protected override void OnPaint(System.Windows.Forms.PaintEventArgs pea)

{

SolidBrush bg = new SolidBrush(Color.Gray);

pea.Graphics.FillRectangle(bg, this.ClientRectangle);

bg.Dispose();

base.OnPaint(pea);

}

}


====================

SmartDeviceApplication2.TextBox2 teste = new TextBox2();

teste.Location = new Point(100, 100);


this.Controls.Add(teste);

========================

But i can't see the changes that i made...
any ideia?




Odd. If you have all the source and it's free, why can't you use it? Do you have some restriction that forces you to do things the long way?

--
Chris Tacke, eMVP
Co-Founder and Advisory Board Member
www.OpenNETCF.org
---
Windows CE Product Manager
Applied Data Systems
www.applieddata.net


hi,

thanks for the tip... but i cant use others components.
any ideia of how to implement this image on the right side of each listbox element?

thanks!
Smart Devices Framework (SDK) includes the owner-drawn listbox that would that:

http://www.opennetcf.org/smartdeviceframework.asp

or here:
http://blog.opennetcf.org/ayakhnin/PermaLink.aspx/40f8d4c0-26ae-4d02-af0b-0c80de605288

--
Alex Yakhnin .NET CF MVP
www.intelliprog.com | www.opennetcf.org
Hi,

I was wondering if I can modify the listbox control using all the properties and methos of the default listbox control, BUT,
placing an image on the right of the display text.

Any ideas?

thanks!
 
Yep, and overriding OnPaint in CF controls isn't supported (I agree that it's a major oversight by the CF team). I'll point again to the owner-drawn list in the SDF that Alex pointed to. It can provide what you want pretty easily.

www.opennetcf.org/smartdeviceframework.asp

--
Chris Tacke, eMVP
Co-Founder and Advisory Board Member
www.OpenNETCF.org
---
Windows CE Product Manager
Applied Data Systems
www.applieddata.net


Hi dood,

I am trying the following code...

public class TextBox2 : System.Windows.Forms.TextBox

{

protected override void OnPaint(System.Windows.Forms.PaintEventArgs pea)

{

SolidBrush bg = new SolidBrush(Color.Gray);

pea.Graphics.FillRectangle(bg, this.ClientRectangle);

bg.Dispose();

base.OnPaint(pea);

}

}


====================

SmartDeviceApplication2.TextBox2 teste = new TextBox2();

teste.Location = new Point(100, 100);


this.Controls.Add(teste);

========================

But i can't see the changes that i made...
any ideia?




Odd. If you have all the source and it's free, why can't you use it? Do you have some restriction that forces you to do things the long way?

--
Chris Tacke, eMVP
Co-Founder and Advisory Board Member
www.OpenNETCF.org
---
Windows CE Product Manager
Applied Data Systems
www.applieddata.net


hi,

thanks for the tip... but i cant use others components.
any ideia of how to implement this image on the right side of each listbox element?

thanks!
Smart Devices Framework (SDK) includes the owner-drawn listbox that would that:

http://www.opennetcf.org/smartdeviceframework.asp

or here:
http://blog.opennetcf.org/ayakhnin/PermaLink.aspx/40f8d4c0-26ae-4d02-af0b-0c80de605288

--
Alex Yakhnin .NET CF MVP
www.intelliprog.com | www.opennetcf.org
Hi,

I was wondering if I can modify the listbox control using all the properties and methos of the default listbox control, BUT,
placing an image on the right of the display text.

Any ideas?

thanks!
 
Ohhh sh**,

i though that CF support overriding events...

So, i will try to create a blank control, than create a listbox on it and place the image inside the new control.
hehehe

Well.. Thanks for the information!
Yep, and overriding OnPaint in CF controls isn't supported (I agree that it's a major oversight by the CF team). I'll point again to the owner-drawn list in the SDF that Alex pointed to. It can provide what you want pretty easily.

www.opennetcf.org/smartdeviceframework.asp

--
Chris Tacke, eMVP
Co-Founder and Advisory Board Member
www.OpenNETCF.org
---
Windows CE Product Manager
Applied Data Systems
www.applieddata.net


Hi dood,

I am trying the following code...

public class TextBox2 : System.Windows.Forms.TextBox

{

protected override void OnPaint(System.Windows.Forms.PaintEventArgs pea)

{

SolidBrush bg = new SolidBrush(Color.Gray);

pea.Graphics.FillRectangle(bg, this.ClientRectangle);

bg.Dispose();

base.OnPaint(pea);

}

}


====================

SmartDeviceApplication2.TextBox2 teste = new TextBox2();

teste.Location = new Point(100, 100);


this.Controls.Add(teste);

========================

But i can't see the changes that i made...
any ideia?




Odd. If you have all the source and it's free, why can't you use it? Do you have some restriction that forces you to do things the long way?

--
Chris Tacke, eMVP
Co-Founder and Advisory Board Member
www.OpenNETCF.org
---
Windows CE Product Manager
Applied Data Systems
www.applieddata.net


hi,

thanks for the tip... but i cant use others components.
any ideia of how to implement this image on the right side of each listbox element?

thanks!
Smart Devices Framework (SDK) includes the owner-drawn listbox that would that:

http://www.opennetcf.org/smartdeviceframework.asp

or here:
http://blog.opennetcf.org/ayakhnin/PermaLink.aspx/40f8d4c0-26ae-4d02-af0b-0c80de605288

--
Alex Yakhnin .NET CF MVP
www.intelliprog.com | www.opennetcf.org
Hi,

I was wondering if I can modify the listbox control using all the properties and methos of the default listbox control, BUT,
placing an image on the right of the display text.

Any ideas?

thanks!
 
Back
Top