Setting icon for buttons in labview 6i
Hi All,
Currently i am working on Labview 6i. i created two buttons in my vi one button is used to perform the test, another will be used to exit from the test. i would like to add icons for those buttons. can anyone tell me how to add icons for buttons.
Thanks,
kalpana
You realize that LabVIEW 6.0 is at least 15 years old? That would be almost equivalent to working with a Windows 98 machine nowadays!
Yes your picture can't be imported in LabVIEW 6.0 on my machine either. I haven't checked about all the details, but the LabVIEW import in 6.0 doesn't seem to work for png and gif images but only for bmp. Newer versions do work for your png file including honoring the transparency at least since version 7.1.
Rolf Kalbermatter
CIT Engineering Netherlands
a division of Test & Measurement Solutions
Similar Messages
-
Setting icon for the JMenuItem
I am trying to set the Icon for the JMenuItem and not able to do so.
I have the Images directory in the classes which has all the images. Is this the way to give the dir path. When do I give '\' and when do I give '/' or'//' or'\\'? Thanks.
I gave
JMenuItem mnuitmFileNew = new JMenuItem(new ImageIcon("Images//new.jpg"));
and later in Jbinit() method I have this.
mnuitmFileNew.setMnemonic('N');
mnuitmFileNew.setText("New");
mnuitmFileNew.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(ActionEvent e) {
mnuitmFileNew_actionPerformed(e);
});Hi,
I'm not sure if you've seen this yet:
http://java.sun.com/docs/books/tutorial/uiswing/components/menu.html
If you still have any questions please post again.
Regards,
Matt
Java Developer Technical Support
Sun Microsystems -
Setting icon for MII version 12.1.x custom action
Hi,
i tryed to set icon image for custom action for MII version 12.1.x but i did not achieve.
How can it be done?
Thanks.Hello,
I have done it in 11.5. This is how I did it in 11.5. (I am hoping that it has not changed in 12.1)
//funciton for specifying icon
public String GetIconPath() {
return "com/path/to/icons/imagename.png";
Store your image file in the following way
com/path/to/icons and name that as imagename.png
There is also a blog on it
/people/rupesh.bajaj/blog/2007/12/04/beginners-guide-to-create-custom-action-block
I hope it helps.
Regards,
Musarrat
Edited by: Musarrat Husain on May 17, 2011 12:18 PM -
Globally setting icon for a file type
I've been using LilyPond a lot recently. The .ly files it saves don't have their own icon, though, they just get the generic document icon. I know that I can manually set an icon for a single file using 'Get Info', but it's not practical now because I have so many .ly files. Is there a way I can tell OS X to use my own icon every time it sees a .ly file?
Thanks,
(- Steve -)Hi, Stephen.
If by LilyPond you mean this application, it's the application's responsibility to assign the custom icon for files it creates, e.g. .ly files you edit and save in LilyPond. You might want to send feedback concerning this to the developers. However, as I understand the application based on a quick review of its manual, it can work with any plain-text (ASCII) file.
You can change the default application in which all .ly files open by using the instructions in "Mac OS X 10.4 Help: Changing the application that opens a document." That may result in those files bearing the same icon as the LilyPond application. That is also the mechanism by which a given icon is assigned to all files of a given type.
Good luck!
Dr. Smoke
Author: Troubleshooting Mac® OS X -
Hi Everyone,
This is more of a 'nice to have', but can anyone recommend a program that I can use to create icons (or comes with prepackaged icons) to use through my HMI, in particular for buttons. Obviously, free would be better.
Cheers,
DavidIf it's graphics you want, you can use anything from Paint to GIMP to even PowerPoint to create your graphics and then copy and import them into the control editor, so they will appear inside your controls and indicators. Read the documentation about customizing controls for more details.
Try to take over the world! -
[SOLVED] Set icons for applications in XFCE
Hi,
I was wondering if I can specify the icons for applications. Currently my gVim is using a "general" icon when in the panel but has the right icon when I create a launcher. This is how it looks like. Any suggestions?
Thanks!
Last edited by dsdeiz (2011-01-10 00:50:57)Hi,
Yep, I have a gvim.desktop in /usr/share/applications. What it contains is:
Type=Application
TryExec=gvim
Exec=gvim
Icon=gvim
Terminal=false
Type=Application
TryExec=gvim
Exec=gvim
Icon=gvim
Terminal=false
There is also gvim.png in /usr/share/pixmaps. -
I created Icon with Borderpane, image and text which I want to set as button icon.
@Override
public void start(Stage primaryStage)
final VBox vbox = new VBox();
// create 3 toggle buttons and a toogle group for them
ToggleButton tb1 = new ToggleButton();
tb1.setGraphic(newConnectionIcon());
ToggleButton tb2 = new ToggleButton();
ToggleButton tb3 = new ToggleButton();
final ToggleGroup group = new ToggleGroup();
tb1.setToggleGroup(group);
tb2.setToggleGroup(group);
tb3.setToggleGroup(group);
// select the first button to start with
group.selectToggle(tb1);
final Rectangle rect1 = new Rectangle(300, 300);
rect1.setFill(Color.DARKOLIVEGREEN);
final Rectangle rect2 = new Rectangle(300, 300);
rect2.setFill(Color.LAVENDER);
final Rectangle rect3 = new Rectangle(300, 300);
rect3.setFill(Color.LIGHTSLATEGREY);
tb1.setUserData(rect1);
tb2.setUserData(rect2);
tb3.setUserData(rect3);
group.selectedToggleProperty().addListener(new ChangeListener<Toggle>()
@Override
public void changed(ObservableValue<? extends Toggle> ov, Toggle toggle, Toggle new_toggle)
if (new_toggle == null)
else
vbox.getChildren().set(1, (Node) group.getSelectedToggle().getUserData());
HBox hBox = new HBox();
hBox.getChildren().addAll(tb1, tb2, tb3);
hBox.setPadding(new Insets(10, 10, 10, 10));
vbox.getChildren().addAll(hBox, (Node) group.getSelectedToggle().getUserData());
StackPane root = new StackPane();
root.getChildren().add(vbox);
Scene scene = new Scene(root, 800, 850);
primaryStage.setScene(scene);
primaryStage.show();
private static BorderPane newConnectionIcon() {
// Add background effect
DropShadow ds = new DropShadow();
ds.setOffsetY(2.0);
ds.setOffsetX(2.0);
ds.setColor(Color.GRAY);
// New BorderPane which will hold the components
bpi = new BorderPane();
bpi.setEffect(ds); // Add the effect
bpi.setCache(true);
// Set the size of the BorderPane
bpi.setPrefSize(30, 30);
bpi.setMaxSize(30, 30);
// Add style
bpi.setStyle("-fx-background-color: linear-gradient(#f2f2f2, #d4d4d4);"
+ " -fx-background-insets: 0 0 -1 0, 0, 1, 2;"
+ " -fx-background-radius: 3px, 3px, 2px, 1px;");
// Add Label to the Icon
Text inftx = new Text("New Connection");
inftx.setFont(Font.font ("Verdana", 5)); // Set font and font size
inftx.setFill(Color.WHITE); // Set font color
ncpic.setFitHeight(25); // Set size of the Icon picture
ncpic.setFitWidth(25);
// Internal StackPane which will hold the picture and the Icon Label
StackPane stack = new StackPane();
stack.getChildren().addAll(ncpic, inftx); // Add the picture and the Label
// Add the StackPane to the main BorderPane
bpi.setCenter(stack);
// Change the border of the Icon when the mouse is over the Icon
bpi = mouseOver(bpi);
// Navigate to new Panel when the user clicks on the Icon
bpi.setOnMouseClicked(new EventHandler<MouseEvent>() {
@Override
public void handle(MouseEvent t) {
return bpi;
How I can remove the default togglebutton and use the my custom icon as a button?Yes, they are icons and they are called "handles". The easiest way to change then is to use UIManager.
If you haven't done so before, look through the hash table UIManager.getLookAndFeelDefaults().
import java.awt.*;
import java.net.*;
import javax.swing.*;
public class TreeIcons {
public static void main(String[] args) throws MalformedURLException {
String prefix = "http://forum.java.sun.com/images/";
UIManager.put("Tree.openIcon", new ImageIcon(new URL(prefix + "dont_save.gif")));
UIManager.put("Tree.closedIcon", new ImageIcon(new URL(prefix + "save.gif")));
UIManager.put("Tree.leafIcon", new ImageIcon(new URL(prefix + "forum_new.gif")));
UIManager.put("Tree.expandedIcon", new ImageIcon(new URL(prefix + "email_faded.gif")));
UIManager.put("Tree.collapsedIcon", new ImageIcon(new URL(prefix + "email.gif")));
JFrame f = new JFrame("TreeIcons");
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.getContentPane().add(new JTree());
f.setSize(new Dimension(300,400));
f.setLocationRelativeTo(null);
f.setVisible(true);
} -
Setting icon for the attachment
Anyone know how to set the icon of the attachment?
I have no problem sending attachment (in this particular case of *.xls files), but the email I received using NOTES shows a default grey box with the correct file. Tried using NOTES to send Excel attachment, and it showed up with a nice icon indicating Excel file. How can I do the same? Thanks in advance.I have had a similar problem and have not been able to determine whether the problem is related to Windows XP Pro, Lotus Notes 5.0.11, or Microsoft Office/OpenOffice. A search of the Internet turned up a number of related issues (attachment icon is missing/invisible, etc).
The Java program I use to email attached files used to work without any problems, but sometime after I moved to an XP workstation, installed Open Office, and applied XP Service Pack 1, the attachment icons (at least for some file types) became invisible. I can't help suspect that the problem lies in XP or Office, but I have not been able to determine that for sure.
FWIW: A suggested workaround (from the Lotus Notes forum) is to change your screen display from 32 colors to 16 colors. This has helped make the attachment icons visible when sending mail from Notes, but it has not helped the Java Mail attachments become any less invisible. Maybe the next step would be to go to a monochrome display? -
How to set icon for .lnk on PPC
I'm using the Mysaifu JVM and I would like to know how to set an icon of my choice for the shortcut file to my application (.lnk). Currently, the Mysaifu character shows up as the icon.
On a previous post, I found out how to run my java application using the following text in my .lnk file:
255#"\Program Files\Mysaifu JVM\jre\bin\jvm.exe" -Xhidevmwindow -Xmx5M -jar "\My Documents\DeliveryOrganizer.jar" DeliveryOrganizer
Please help!!!
Your help would be much appreciated!
Thanks!I don't think you're going to have much luck modifying the original link, since the jvm.exe is what the link is pointing to. Windows Mobile is getting its icon from the jvm.exe, and not the DeliveryOrganizer jar file.
However, you might look into creating a separate .lnk file, that then calls your original .lnk file that executes the jvm.exe. See if Windows Mobile allows you to modify the new .lnk file's properties... -
Set URL for button in a PageButtons tag on a savedialog
I'm working on an application and need to be able to set the values for the button URL where the buttons are generated from a PageButtons tag in a savedialog page. They are being set to return to the page where the save button was clicked which is a JSP, but the application restrict access to the JSP to be performed through a Servlet Handler so I a get a permission error. I need to be able to set the button url to be show.analayze Does any know how I can change the URL for the buttons?
MikeKutz wrote:
I think Homer Simpson said it best: Doh!
For the person in the future, you have to 'fake create' the Automated Row Fetch process.
The get_blob_file_src gets all the information from that Process and the column name of the Item Type that is on the same page.
I forgot where I read about that trick.
Basically, you create the Automated Row Fetch process, then 'disable' it.
Same thing with the required Item Type. Create it as a "File Type", just to tell APEX that it comes from a Database Column,.... then change it to a 'hidden' type.
You don't have to "fake' it if the application already contains the file upload item and ARF. The assumption is that the application will contain these components in order to maintain the BLOBs and you'll just reference the functional ones. -
hi,
I have a JTree. For this JTree i have a DefaultJTreeCellRenderer.
i have done like this
JTree tree = new JTree();
DefaultJTreeCellRenderer renderer = new DefaultJTreeCellRenderer();
renderer.setOpenIcon(....);
renderer.serCloseIcon(...);
tree.setCellRenderer(renderer);but this is not working.
how to change the icons of the node when i click
thank youpublic class Test extends JFrame implements ActionListener {
private static final long serialVersionUID = 1L;
private JButton buttonCreate;
private JTree tree;
private DefaultMutableTreeNode defaultMutableTreeNode;
private DefaultTreeModel defaultTreeModel;
private int i;
public Test() {
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
layoutComponents();
setSize(400, 400);
setLocationRelativeTo(null);
setVisible(true);
private void layoutComponents() {
defaultMutableTreeNode = new DefaultMutableTreeNode("Root");
defaultTreeModel = new DefaultTreeModel(defaultMutableTreeNode);
tree = new JTree(defaultTreeModel);
tree.setRootVisible(false);
buttonCreate = new JButton("Create");
getContentPane().setLayout(new BorderLayout());
getContentPane().add(tree, BorderLayout.CENTER);
getContentPane().add(buttonCreate, BorderLayout.SOUTH);
DefaultTreeCellRenderer renderer = new DefaultTreeCellRenderer();
ImageIcon icon_close = new ImageIcon("./images/project_closed.gif");
ImageIcon icon_open = new ImageIcon("./images/project_opened.gif");
renderer.setOpenIcon(icon_open);
renderer.setClosedIcon(icon_close);
tree.setCellRenderer(renderer);
buttonCreate.addActionListener(this);
public static void main(String[] args) {
new Test();
public void actionPerformed(ActionEvent e) {
addElementToParent("Child" + i++);
private DefaultMutableTreeNode addElementToParent(Object theChild) {
return addElementToParent(defaultMutableTreeNode, theChild, true);
private DefaultMutableTreeNode addElementToParent(DefaultMutableTreeNode theParent, Object theChild, boolean shouldBeVisible) {
DefaultMutableTreeNode childNode = new DefaultMutableTreeNode(theChild);
if (theParent == null) {
theParent = defaultMutableTreeNode;
defaultTreeModel.insertNodeInto(childNode, theParent, theParent.getChildCount());
TreePath childTreePath = new TreePath(childNode.getPath());
// Make sure the user can see the lovely new node.
if (shouldBeVisible) {
tree.scrollPathToVisible(childTreePath);
tree.requestFocusInWindow();
return childNode;
}this is the code which i was trying to execute.
here i want to explain you is
when i click the node the icon should change to open_icon
when i click the other node the previous node icon should change to close_icon
how is this possible
null -
I wanted to set an icon image along with a label in MenuItem(AWT). I am not using swing component (JMenuItem). Could any one advice me how to do this.
Thanks in advance.As far as I know you can't set an icon in a MenuItem object. MenuItem extends MenuComponent, which extends Object. None of which have a paint or paintComponent method which you can modify. Maybe you can extend MenuItem and create a class with a paintComponent method?
Sorry -
Set icon for toggle control of JTree node.
hi.
Just a question.
I am looking towards setting the icons of the JTree by this i mean the icon that you click on
to open say a node .
I know you can set the icons of the nodes by setIcon inside your TreeCellRenderer but i doubt that
that will set the icon that is to the left ot your label.
Has anyone gone down this path recently.
The class BasicTreeUI has a method
called paintExpandControl( Graphics g,
Rectangle clipBounds,
. Insets insets,
Rectangle bounds,
TreePath path,
int row,boolean isExpanded,
boolean hasBeenExpanded,
boolean isLeaf)
Hopefull this is a method that can paint the toggle node so has anyone subclassed BasicTreeUI and done something like this recently.
Any advise on the topic is really appreciated.
Thank you.Yes, they are icons and they are called "handles". The easiest way to change then is to use UIManager.
If you haven't done so before, look through the hash table UIManager.getLookAndFeelDefaults().
import java.awt.*;
import java.net.*;
import javax.swing.*;
public class TreeIcons {
public static void main(String[] args) throws MalformedURLException {
String prefix = "http://forum.java.sun.com/images/";
UIManager.put("Tree.openIcon", new ImageIcon(new URL(prefix + "dont_save.gif")));
UIManager.put("Tree.closedIcon", new ImageIcon(new URL(prefix + "save.gif")));
UIManager.put("Tree.leafIcon", new ImageIcon(new URL(prefix + "forum_new.gif")));
UIManager.put("Tree.expandedIcon", new ImageIcon(new URL(prefix + "email_faded.gif")));
UIManager.put("Tree.collapsedIcon", new ImageIcon(new URL(prefix + "email.gif")));
JFrame f = new JFrame("TreeIcons");
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.getContentPane().add(new JTree());
f.setSize(new Dimension(300,400));
f.setLocationRelativeTo(null);
f.setVisible(true);
} -
Problem when setting icon for Jframe.....
Hi.....
Iam trying to change the icon of jframe.Iam using the following code.
Toolkit tk = frame.getToolkit();
Image ic = tk.getImage("icons/abc.ico");
frame.setIconImage(ic);
But iam unable to see the icon.In the place of icon empty box is coming.
Any help regarding this will be highly appreciated.
Thanks and Regards,
Kumar.dunno if you can use an ico format, try gif, tif et al
thomas -
How to set different Icons for Jtreenode
How to set different Icons for Jtreenode,i want to set icons for jtreenode,not only for leaf,open,closeicon,i hope that each node has a different icon.Thanks!
you need to check for the node value within a renderer, then assign an icon based on what you expect to get back.
check out this page. http://java.sun.com/docs/books/tutorial/uiswing/components/tree.html
Maybe you are looking for
-
Return to same record on previous page after using form
Hi, I have an application that contains a table with tasks and subtasks (which are linked to a task), and for every task, there is a 'add subtask' link, which links to a form where I can create new subtasks for that task. My problem is that when I ha
-
How come iMac can see my iPhone with iPhoto but cannot syncronize it with iTunes? Maybe need an update version? As a matter of fact iTunes version on iMac is a 10.4 and in iPhone I get a 10.6: the iMac is brand new since I just come from a pc. Thanks
-
Remove message attributes from the message
Hello I use FM RRMS_MESSAGE_HANDLING to generate a mesage in SAP BI. mesage number is 000, mesage class BRAIN , message type I System generates the following message : I : BRAIN : 000 : Mesage text How is it possible toget rid of I : BRAIN : 000? tha
-
I got the above message when trying to convert a 235 page .pdf into an .XLSX document. How can I find out the error?
-
hello community, im new to macbook; i purchase this macbook at a yard sale everything seems to be working ok but i am unable to access the system preference in order to change the desktop or remove old accounts. the owner did not have the os disc. do