How do I add new methods to a pointstyle object?

Using a scatterplot, I change each point's color (and shape) to reflect the range of the Y-value passed in. This is done with an override to the "draw" function (see below). Right now the Y-value ranges are "hardcoded" in the override. I would like to be able to dynamically change the range with a user entry at runtime.
I have tried adding a public function to my code which could be called to change the value of the range variable, but .NET does not recognize it. Can this, in fact, be done, or is there an alternate scheme to accomplish the same thing?
thanks.
Code (partial):
public class DynamicPointStyle : PointStyle
private rangeHigh = 5;
private rangeLow = 2;
public override void Draw(obj
ect context, PointStyleDrawArgs args)
double yValue = args.Y;
if (Math.Abs(yValue) > rangeHigh) //5dB
PointStyle.Plus.Draw(context, CreateArgs(args, Color.Red));
else if (Math.Abs(yValue) > rangeLow) //2dB
PointStyle.EmptyCircle.Draw(context, CreateArgs(args, Color.Yellow));
else
PointStyle.SolidCircle.Draw(context, CreateArgs(args, Color.Green));
??public void updateRange (double rHigh, double rLow)
rangeHigh = rHigh;
rangeLow = rLow;

I'm not sure what you mean by ".NET does not recognize it." Did your code not compile at all? If so, which part did the compiler complain about? When you tried to call the method, what was the type of the reference that you were calling the method on? Could you please also post the code that uses this class and that demonstrates the error?
Without having seen the code, though, my first guess would be that you were trying to call the method on a PointStyle reference, but the method doesn't live on PointStyle, so that was generating an error. If this is the case, you would need to hold on to a reference to the DynamicPointStyle class and call the method via this reference. For example:
class TestForm : Form
private DynamicPointStyle dynamic
Style;
protected override void OnLoad(EventArgs e)
// Keep a reference to the dynamic style so you can access the method
// later.
dynamicStyle = new DynamicPointStyle();
plot1.PointStyle = dynamicStyle;
private void UpdatePointStyleRange(double low, double high)
// To update the range, call the method via the DynamicPointStyle
// reference instead of trying to call if via a PointStyle reference.
dynamicStyle.UpdateRange(low, high);
- Elton

Similar Messages

  • Is it possible to add new method in existing photoshop object model?

    someone suggested to use automation scripting plugin that can record & replay event through action manager.I am new to photoshop can anyone tell how & where to add functionality in sample plugin(like filter/dissolve) given in photoshop sdk.Pls reply

    Add a plugin that does what you need, add scripting terminology to that plugin, then call that plugin from JavaScript (or other scripting language).

  • HT1351 We had 2 computers: his itunes library on one, and mine on the other. We got rid of both of those and got a new computer.  I put music on the new computer.  My ipod songs are not on itunes.  Will I erase them if I sync?  How do I add new music?

    We had 2 computers: his itunes library on one, and mine on the other. We got rid of both of those and got a new computer.  I put new music on the new computer.  My ipod songs are not on itunes on the new computer.  Will I erase them if I sync?  How do I add new music?

    See this older post from another forum member Zevoneer covering the different methods and software available to assist you with the task of copying content from your iPod back to your PC and into iTunes.
    https://discussions.apple.com/thread/2452022?start=0&tstart=0
    B-rock

  • How can I add new row/column into existing jTable?

    Hi add!
    Can you help me how can I add new row/column into existing jTable?
    Tnx in adv!

    e.g
    Create two buttons inside the Table ( "Add New Row" ) and ("Add new Column")
    their handlers are:
    add new row:
    //i supose u already have
    DefaultTabelModel tablemodel = new DefaultTableModel(rowdata, columnNames);
    //and   
       JTabel jtable = new JTable(tablemodel);
    // Handler (row)
    jbtAddRow.addActionListener(new ActionListener(){
       public void actionPerformed(ActionEvent e) {
          if(jtable.getSelectedRow() >= 0 )
              tablemodel.insertRow(jtable.getSelectedRow(), new java.util.Vector());  
           else  
                tablemodel.addRow(new java.util.Vector());
        });to add new columns its the same but inside actionPerformed method:
    ask for e.g "Whats the name for the new column"
    then,
       tablemodel.addColumn(nameOfColumn, new java.util.Vector());   Joao
    Message was edited by:
    Java__Estudante

  • How do I add new Apple ID as it said it reach maximum

    Please tell me how do I add new apple id as I already added a lot and it's said that it reach maximum. I forgot my Apple ID password and can't recover because I cant ***** the email.

    Easy. Open System Preferences > iCloud and sign in with the same Apple ID and password you used when you initially set up your MacBook Pro. Select the iCloud services you wish to use.
    I also want to know how to sink my phone with my Mac
    Read iOS: Syncing your data with iTunes
    Instructional video

  • How do I add new contacts to my Hotmail on my IPad?, How do I add new contacts to my Hotmail on my IPad?, How do I add new contacts to my Hotmail on my IPad?, How do I add new contacts to my Hotmail on my IPad?

    How do I add new Contacts to my Hotmail on my IPad?

    You can add them via the Contacts application on your iPod or via the Hotmail interface in a web browser.
    For future reference, this forum is for older iPods not the iPad, so you post future questions regarding your iPad in the iPad forums.
    https://discussions.apple.com/community/ipad
    B-rock

  • How can I add new content in iDVD to a DVD-RW disc which has ample remaining free space? After preparing the new video for burning and clicking on Burn to iDVD, I get a window saying the disc's already recorded and that I can either Erase or Eject.

    How can I add new content in iDVD to a DVD-RW disc with a video previously successfully recorded on it? (The disc has ample remaining free space.)
    After preparing the new video for burning and clicking in the File menu on Burn to iDVD, I get a window saying the disc's already recorded and that I can either Erase or Eject. My assumption has been that iDVD would automatically find the free space and continue with the new recording from there. I'd be grateful if anyone can shine light on this.

    There are, but not with a DVD written as a movie disk. It must be closed when completed, or it doesn't work.
    Apple's built in Burn utility also automatically closes any data CD, DVD or Blu-ray disk you burn. Doesn't matter how much space is unused, you can't use it. You'd have to use a more advanced disk creation app, such as Toast Titanium. I then have the option of choosing to write the data as a session:
    I can keep doing this until the disk is full. If I've written five sessions to the disk, when I put it in the drive, five CD/DVD icons will appear on the desktop since the OS will treat each session as if they are separate physical disks. At any point you choose Write Disk when writing a group of data, that means you're closing the disk, and again can't add anything after that. So if I had written two sessions, and the third was Write Disk, it's over. I can't put anything else on that disk.

  • How can i add new tab in Business Partner

    hi every body,
    Present i am working on SAP CRM 3.0 version. i need to add new tab in BP.  Here EEWB not available. How can i add new tab?

    Hi  babu,
    you can add new tab in Buisness partner with the help of screen configaration functionality,in screen configaration u select first bp role (sold to party or retailer etc) and click on process screen sequence  and again click on overview and u will get fields right side of the screen, there u will see the field "new screen" click on that and add description for new tab and click on continue,save the document
    now u will again create a bp with modified bp role u will see changes means u will see new tab page on perticular bp role
    i hope this is helpful
    Rewards points if helpful
    Thanks&regards
    kishore kumar

  • How can i add new jcomponent to a frame?

    hi.
    how can we add new component to a frame? look at this code. Why when i click on button, nothing added to frame? event handled correctly and frame size changes but no button adds to frame.
    private void convertButtonMouseClicked(java.awt.event.MouseEvent evt) {
    // TODO add your handling code here:
    JButton newButton = new JButton("new");
    getContentPane().add(newButton , BorderLayout.CENTER);
    newButton.setVisible(true);
    setSize(500, 500);
    }

    Don't forget to use the Code Formatting Tags so the posted code retains its original formatting. That is done by selecting the code and then clicking on the "Code" button above the question input area.
    Well typically you wouldn't add a button to the Center of a BorderLayout. If you really want to do this you should be using a [Card Layout|http://java.sun.com/docs/books/tutorial/uiswing/TOC.html].
    In general the code for adding/removing components should be:
    panel.add(...)
    panel.revalidate();
    panel.repaint();

  • How do I add new fonts I've downloaded to Microsoft Word? It's in my font book but not usable on MW., How do I add new fonts I've downloaded to Microsoft Word? It's in my font book but not usable on MW.

    How do I add new fonts I've downloaded to Microsoft Word? It's in my font book but not usable on MW.,

    Typical issue with Font Book.
    Restart your Mac and immediately hold down the Shift key when you hear the startup chime to boot into Safe Mode. Keep holding the Shift key until you see a progress bar towards the bottom of the screen. You can let go of the Shift key at that point.
    OS X asks you to log in (you will get this screen on a Safe Mode boot even if your Mac is set to automatically log in). Let the Mac finish booting to the desktop and then restart normally. This will clear Font Book's database and the cache files of the user account you logged into in Safe Mode.

  • How can I add new songs to the top (not the bottom) of my playlist in iTunes?

    How can I add new songs to the top of my playlist in iTunes?
    I thought thats what it did before but now it automatically adds new songs to the bottom of the list.
    Not a huge issue but an annoyance.

    Go to your Music library
    Then, Click Playlist
    Then, Click the sort arrow until it points down.

  • How Do I add new fields to Repeating Frames in existing Report

    Hi,
    How do I add new fields to Repeating Frames in existing Report. The Report has 2 GRPFR, 1 HDR and 2 Repeating Frames. I would like to add a new field(column) to inner most repeating frame. I added the new golumn to QUERY and GROUPs in Data Model. After adding the new column to inner most Repeating Frame in Layout Model, the Layout model is losing all other frame and it is showing only the modified one.
    How do I add new column to repeating frames without disturbeing other frames.
    Any hellp will be appreciated!!!!!!!!!!!.
    I am using Oracle Reports 6i.
    Thanks,
    Ravi.

    you must work in your layour editor
    expand your repeating frames do it more big
    for add your new items or field. after you inserted or add, can you put more little your repeating.
    too can you to do one copy of one field in your repeating frame and assign it in his source your new item in your data model.
    normally i begin with the principal frame and go one by one internally.

  • I have one playlist on iphone4. how can i add new playlist without deleting old one. i do not have old playlist in itunes any more.

    I have one playlist on iphone4. how can i add new playlist without deleting old one. i do not have old playlist in itunes any more.When i try to sync iphone with itunes it says that this action will remove my old playlist and all songs.

    "it says that this action will remove my old playlist and all songs."
    Are you connecting to a different iTunes library than you normally connect to?  That will erase the songs and playlists since the iPhone can't be connected to multiple libraries even if it is in manual sync mode.
    If you no longer have access to the original library that your iPhone calls 'home', then the only way to save the playlist (and the songs on your iPhone) would be to use a 3rd party application to extract your iPhone contents to this new iTunes library you're trying to connect to.

  • How can I add new background on iweb?

    Dear all,
    somebody knows how can I add new backgroungs on iweb? and also how can I add my own themes?
    Cheers

    bobzhuman wrote:
    You can add new backgrounds in the "page"..."layout" section of the "inspector"...no limit to what you can add. Remember to use low resolution pics (72 dpi vs 300 dpi) and think of the size necessary for a "wallpaper" on your desktop. ex. http://www.desertmoon.net/Coryhamilton/Home.html done with a Jumsoft theme (baseball dark) as a core.
    The file used as a background on that site is located at http://www.desertmoon.net/Coryhamilton/Home_files/grunge.jpg
    It's dimensions are 1200px by 797px and 284k in file size. I guess there might be a reason to have the width set for 1200px even though file sizes could benefit from a smaller dimension repeating graphic, but running the file through Photoshop or even Elements would let the owner "Save For Web" as a .jpg - medium quality and get the file size down to about 108k so that the page would load quite a bit faster.

  • How can I add new songs and videos...?

    How can I add new songs and videos to my ipod without syncing as it wants to wipe out the ipod and replace all the existing media?

    On the ipod itself?  If so how?
    I've tried checking on box by the sync music to deselect "Entire music library", but get the  message about "Are sure.... All existing content on the iPod will be removed and replaced...".  However, I don't want to do that as there is music on my ipod I don't want to loose, got it from a previous computer that crashed and could not be recovered.

Maybe you are looking for

  • Function Module for Campaigns

    Hi Experts, I have an query, I am executing a Campaigns based on this campaign creating a Leads as transaction. I need some function module or BAPI , using which i can download the Lead Numbers , Business Partner Details like name , address, marketin

  • ABAP Program Names to Run V3 Jobs from SM36

    Hi, I would like to Schedule the V3 Jobs for SD, MM, PM and other Modules Throug SM36 , Can you please let me know the ABAP Program Names for all of them or can i have any PDF documents that contains this list? I could abel to find only for SD I am u

  • Displaying Travel Expense form as attachment to UWL workitem

    Hi experts, We have customized the travel expense workflow that is WS20000040. When the requestor raises a travel expense request it goes to the manager for approval in his UWL. There by default, according to the standard functionality, when approver

  • Debugging authorizations for Web Dynpro

    Hi I want to know the various Roles which are required to activate external debugging required for WebDynpro.... I have been able to debug in Development environment but i think some roles or authorizations are missing in Quality environment.. Please

  • Using Cursors

    DBT key; DBT data; DB * dbp; DBC *dbcp; struct DATA Data; int ret; memset(&key,0,sizeof(DBT)); memset(&data,0,sizeof(DBT)); /* Should I set the memory for the structure before passing it to the DBT structure? */ memset(&Data,0,sizeof(DATA)); dbp->cur