07-12-2005 01:05 PM
07-12-2005 02:49 PM - edited 07-12-2005 02:49 PM
jmoses,
I don't know if there is a way to do it using CVI, but there is a way to programatically do it. See the code sample below:
char Str1[10] = "HELLO";
char Str2[10] = "WORLD";
char temp_Str[4] = ""
for (index = 0; index < 6; index ++)
{
temp_Str[0] = Str1[index];
temp_Str[1] = 32; //ASCII space character
temp_Str[2] = Str2[index];
InsertTextBoxLine (panel, PANEL_TEXTBOX, index, temp_Str);
}
P.S. please excuse my other posts, I hit the TAB key and then SPACE BAR really quickly causing my message to be posted a bunch of times
Message Edited by DaveC on 07-12-2005 02:53 PM
07-12-2005 02:49 PM - edited 07-12-2005 02:49 PM
Duplicate post by accident
Message Edited by DaveC on 07-12-2005 02:53 PM
07-12-2005 02:49 PM - edited 07-12-2005 02:49 PM
Duplicate post by accident
Message Edited by DaveC on 07-12-2005 02:53 PM
07-12-2005 03:06 PM
07-12-2005 05:10 PM
Hello JMoses,
You can generate vertical text with a text massage control by putting new line characters between each letter in the message. On the UIR, you should place the text message control on top of your graph where you want the Y-Axis label to be. Then you can change the Z-Order so the text message appears on top of the graph (Arrange >> Control ZPlane Order). Then when you edit the value of the text message, press <CTRL-Enter> between each letter to create vertical text.
Likewise, you can print vertical text programmatically by doing something like: SetCtrlVal (panelHandle, PANEL_TEXTMSG, "T\nE\nS\nT\nI\nN\nG")
Thanks.
07-12-2005 05:34 PM
Dear Wendy L,
Thanks. Your suggestion is similar to DaveC's suggestion. But apparantly I have not been clear about what I need. I want the letters rotated 90 degrees. So when you turn you head 90 degrees, you read the text normally. Most books, including the NI catalog, have their titles printed on the spine in this way. And CVI's built-in Y-axis graph label is printed this way. I want to make my own labels like this.
Josh
07-12-2005 05:39 PM
Hello jmoses,
Got it. Check out the following example program which demonstrates how to rotate text using the canvas control.
Thanks.
07-12-2005 05:54 PM
This will work. Thank you very much.
If I had only used the keyword, "rotate," instead of "vertical orientation," in my search, I would have found the example myself.
Thanks,
Josh
07-12-2005 06:00 PM
Hello JMoses,
I did some further research and came across another way to do vertical labels. Check out the following KnowledgeBase.
Thanks.