ejensen Posted May 1, 2009 Report Share Posted May 1, 2009 I am writing an app to output a .csv file to an XY graph indicator. It contains a list box that allows 1 or more plots to be selected and displayed. I finished the app, and everything worked as it should, but I couldn't get over how bad the cursor legend looked on my front panel. For example, the column headings are bolded in the cursor legend. There is no other bolded text on my FP. I made an attempt to edit the appearance of the cursor legend, but was unable to figure it out. It seems the cursor legend is all one image in the control editor. I decided to make my own cursor box. I made a multicolumn listbox that matched my FP nicely, and added the functionality to add and delete cursors from the list. Eventually I got everything working, but in my testing, I've noticed that every time I add a new cursor, the old cursors shift one X value to the left on the graph. I have been unable to find any reasonable explanation for this behavior, and I'm wondering if anyone else has seen and fixed a similar issue. When the Add Cursor event is called, the cursor is created. Next, I redraw the graph by resending the same values already being displayed. This may not be necessary, and seems to be the source of the issue, but it was the only way I could find to make the new cursor appear. Without redrawing, the cursor would be created (I confirmed by aborting and checking cursors tab on graph properties), but it would not show on the graph. Using highlight execution, the shift happens during the Update Graph state when the graph is redrawn, not when the new cursor is actually created. I've attached an image of my Update Graph subvi. It seems pretty straightforward, which is why I'm a bit confused by the issue. The true case just passes an empty cluster to the graph as a placeholder for non-selected plots. Any suggestions are greatly appreciated. I would be willing to ditch my cursor box completely if I could find a way to modify the existing cursor legend. Quote Link to comment
Francois Normandin Posted May 1, 2009 Report Share Posted May 1, 2009 It's not as elegant as making it regular instead of bold, but you could use "Customize control" to change the cursor legend with a superposition of regular font titles. I don't think it can be changed. Quote Link to comment
ShaunR Posted May 1, 2009 Report Share Posted May 1, 2009 You can change the cursor legend font as with any other indicator/control. Just set the font of the cursor legend to "Plain". Then they won't be bold.(If that's all you need to acheive). Quote Link to comment
ejensen Posted May 1, 2009 Author Report Share Posted May 1, 2009 QUOTE (ShaunR @ Apr 30 2009, 12:07 PM) You can change the cursor legend font as with any other indicator/control.Just set the font of the cursor legend to "Plain". Then they won't be bold.(If that's all you need to acheive). There are some other things I don't like about the looks of the cursor legend, but I can make the rest of my FP match the style and be done with it. Thanks for pointing this out. EDIT: I'm not seeing the property for this. The only font properties I see that are associated with the graph are the label and scale fonts. Am I missing something? Quote Link to comment
Francois Normandin Posted May 1, 2009 Report Share Posted May 1, 2009 QUOTE (ejensen @ Apr 30 2009, 02:02 PM) EDIT: I'm not seeing the property for this. The only font properties I see that are associated with the graph are the label and scale fonts. Am I missing something? It doesn't exist. When you customize an XY Graph, you can see it's not selectable (not text). The Cursor Legend properties do not include Font properties, nor private properties (I checked). You can change the fonts of the cursor name, but not the title "Cursor/X/Y". Quote Link to comment
ejensen Posted May 1, 2009 Author Report Share Posted May 1, 2009 QUOTE (normandinf @ Apr 30 2009, 04:30 PM) It doesn't exist. When you customize an XY Graph, you can see it's not selectable (not text). The Cursor Legend properties do not include Font properties, nor private properties (I checked).You can change the fonts of the cursor name, but not the title "Cursor/X/Y". Thanks for confirming this. Your suggestion above would work except I'm not sure if/how that would handle resizing the column headers. If I were more familiar with using the custom controls editor, I would be more willing to give that a shot. I decided to just make the rest of my FP match the cursors legend and use the built-in cursors functionality. I don't like the way it looks, but it is functional, and that's what matters. I'm still not sure why my other method was shifting the cursors, but that's a problem for another day. Thanks again. Quote Link to comment
Francois Normandin Posted May 1, 2009 Report Share Posted May 1, 2009 QUOTE (ejensen @ Apr 30 2009, 05:47 PM) Thanks for confirming this. Your suggestion above would work except I'm not sure if/how that would handle resizing the column headers. The column resizing would definitely be a problem... Quote Link to comment
ShaunR Posted May 1, 2009 Report Share Posted May 1, 2009 QUOTE (normandinf @ Apr 30 2009, 10:30 PM) It doesn't exist. When you customize an XY Graph, you can see it's not selectable (not text). The Cursor Legend properties do not include Font properties, nor private properties (I checked).You can change the fonts of the cursor name, but not the title "Cursor/X/Y". Right...lol So it must be impossible to do this then http://lavag.org/old_files/monthly_04_2009/post-15232-1241128886.png' target="_blank"> Quote Link to comment
Francois Normandin Posted May 2, 2009 Report Share Posted May 2, 2009 QUOTE (ShaunR @ Apr 30 2009, 06:02 PM) Right...lolSo it must be impossible to do this then Please indulge us!!! :thumbup: Which property do you use...? QUOTE (ShaunR @ Apr 30 2009, 06:02 PM) Right...lol So it must be impossible to do this then Oh, I see. Simply select the cursor legend on the front panel and choose the font from the ring menu... At least I wasn't stupid... the property doesn't exist for doing it programmatically. I should have checked if the computer was connected before I complained about the black screen!!!! Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.