Grorange Posted May 16, 2007 Report Share Posted May 16, 2007 Under special circumstances, we need to be able to create a gauge using strictly code. I am trying to instantiate a new gauge and set all the options manually, then use RenderToStream() to send it to an image file. How can I change the value of the Main Indicator using code? It is of type object, which doesn't make much sense considering a lot of other fields (such as BorderWidth, Height, and Width) are of type Unit. I tried creating a new Unit, sending it a float. That failed miserably. Thanks in advance, Grorange Link to comment Share on other sites More sharing options...
Grorange Posted May 16, 2007 Author Report Share Posted May 16, 2007 Fixed it. Instead of creating a new Unit object, I just set the Indicator's value to a simple float. Yeah, it was that easy. So what! Shut up! (kidding...) Link to comment Share on other sites More sharing options...
JuanC Posted May 17, 2007 Report Share Posted May 17, 2007 The rationale behind this decision was that a gauge is able to show integers, floats, etc. Also a digital gauge can show strings. JuanC Link to comment Share on other sites More sharing options...
Grorange Posted May 18, 2007 Author Report Share Posted May 18, 2007 This one wasn't you, it's me. I'm not completely used to C#. I did a lot of C++, so there are a lot of expectations I have about what you can put in an object (ie. not int, float, double, etc.) Got it, though, thanks. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.