'LED' widget

This forum can be used to talk about general design strategies, new ideas and questions in general related to wxWidgets. If you feel your questions doesn't fit anywhere, put it here.
Post Reply
johnb
Earned a small fee
Earned a small fee
Posts: 12
Joined: Fri Apr 22, 2005 3:28 pm

'LED' widget

Post by johnb » Wed May 18, 2005 1:27 pm

I finally got my multiport serial i/o program, including interrupt
event handling into the testing stage (thanks upCASE for your
direction).
I would like to show the 'rts/cts/dsr/dtr' lines in the form of led's (red/green). Is there a widget for something like this or do I have
to draw them in a panel manually ? If I have to draw the led's,
then I will need some help.

Thanks

johnb

upCASE
Site Admin
Site Admin
Posts: 3176
Joined: Mon Aug 30, 2004 6:55 am
Location: Germany, Cologne

Re: 'LED' widget

Post by upCASE » Wed May 18, 2005 1:38 pm

Hi!
johnb wrote: I would like to show the 'rts/cts/dsr/dtr' lines in the form of led's (red/green). Is there a widget for something like this or do I have
to draw them in a panel manually ? If I have to draw the led's,
then I will need some help.
Glad I could help :D
There is no "native" wx widget for that. Check here: http://www.iftools.com/awx.en.html
If you want to do it yourself: Feel free to ask :D
OS: OpenSuSE, Ubuntu, Win XP Pro
wx: svn
Compiler: gcc 4.5.1, VC 2008, eVC 4

"If it was hard to write it should be hard to read..." - the unknown coder
"Try not! Do. Or do not. There is no try." - Yoda

User avatar
ABX
Can't get richer than this
Can't get richer than this
Posts: 810
Joined: Mon Sep 06, 2004 1:43 pm
Location: Poznan, Poland
Contact:

Re: 'LED' widget

Post by ABX » Wed May 18, 2005 1:43 pm

johnb wrote:I finally got my multiport serial i/o program, including interrupt
event handling into the testing stage (thanks upCASE for your
direction).
I would like to show the 'rts/cts/dsr/dtr' lines in the form of led's (red/green). Is there a widget for something like this or do I have
to draw them in a panel manually ? If I have to draw the led's,
then I will need some help.
There is LED control in contrib/gizmos IIRC.

ABX
CVS Head, 2.8.X
wxMSW, wxWinCE, wxPalmOS, wxOS2, wxMGL, bakefile
gcc 3.2.3, bcc 5.51, dmc 8.48, ow 1.6, vc 7.1, evc 3/4, pods 1.2

johnb
Earned a small fee
Earned a small fee
Posts: 12
Joined: Fri Apr 22, 2005 3:28 pm

Post by johnb » Wed May 18, 2005 3:43 pm

I imported C:\Dev-Cpp\wx\contrib\samples\gizmos\led.dsp

The compiler returned the following error messages:

[resource error] can't open icon file 'sample.ico' No such file or directory
[Build Error] [led_private.res] Error 1

johnb

User avatar
ABX
Can't get richer than this
Can't get richer than this
Posts: 810
Joined: Mon Sep 06, 2004 1:43 pm
Location: Poznan, Poland
Contact:

Post by ABX » Thu May 19, 2005 10:05 am

johnb wrote:I imported C:\Dev-Cpp\wx\contrib\samples\gizmos\led.dsp

The compiler returned the following error messages:

[resource error] can't open icon file 'sample.ico' No such file or directory
[Build Error] [led_private.res] Error 1

johnb
I do not know what Dev-Cpp is doing but AFAIK building from command-line with delivered makefiles is working fine.

ABX
CVS Head, 2.8.X
wxMSW, wxWinCE, wxPalmOS, wxOS2, wxMGL, bakefile
gcc 3.2.3, bcc 5.51, dmc 8.48, ow 1.6, vc 7.1, evc 3/4, pods 1.2

johned
Knows some wx things
Knows some wx things
Posts: 28
Joined: Sun May 22, 2005 5:02 pm

LED

Post by johned » Sun May 22, 2005 5:17 pm

Hi John,

Please check out the wiki (http://wiki.wxwidgets.org/wiki.pl?Table_Of_Contents) under contributed classes. I have put a simple LED class up there.

I hope it works for you.

John

Post Reply