Anchorpane Background Image Javafx. File NavImg = new File("Navigation. Click on the Anchor
File NavImg = new File("Navigation. Click on the AnchorPane and add this code to the style TextArea. layout Description Provides classes to support user interface layout. Apr 3, 2019 · I'm currently writing a program where I want to have a background image, which resizes with a preserved ratio, when the scene is being resized as well. The AnchorPane layout allows the edges of child nodes to be anchored to an offset from the anchor pane's edges. 1. It ensures that nodes maintain a fixed distance from the edge of layout pane. Shrinking an AnchorPane does NOT shrink/move ANY of its children nodes, because they stay in their layout positions. Dec 1, 2013 · I'm trying to put a background image on the GUI of a Java program I'm making. Feb 12, 2024 · Create a Transparent Background Using -fx-background-color: transparent To achieve a transparent background in JavaFX, utilize the CSS property -fx-background-color: transparent;. Creating a Layout To create a layout, we need to follow the given steps − Create node. Node javafx. This blog post will delve deep into the fundamental concepts of the `AnchorPane`, explore its usage methods, discuss common practices, and share best practices to help you master this For a description of the classes in the CSS file, see Fancy Forms with JavaFX CSS. setFill() line gets executed, it fills the rectangle with the image I put in the command without considering the background color of anchorpane. When AnchorPane changes the length, the length of subcomponents will be also accordingly changed. CSS (Cascading Style Sheets) provides a powerful way to style the background of an AnchorPane, enabling developers to create visually This document describes the JavaFX Cascading Style Sheets (CSS) for JavaFX 22 and explains the styles, values, properties and associated grammar. Apr 25, 2014 · In JavaFX you can style your user interface using CSS. First and second par In JavaFX, when using Scene Builder, you typically set background images or styles programmatically rather than directly in Scene Builder itself. control. VBox?> AnchorPane allows the edges of child nodes to be anchored to an offset from the anchor pane's edges. Here, we will study how achoring works on single edge, 2 Apr 9, 2018 · I tried giving the pane a background image through SceneBuilder CSS but that simply didn't work. You can add more rules according to your needs. png in the GUI. 0" /> <Button fx:id="sendButton" layoutX="324. The position property defines how to position the image on the Region while the size property defines the size of the image on the Region. public cl Jun 11, 2015 · In my FXML document I have the following code: <AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" styleClass="header In this JavaFX tutorial we will explore how to change the Default Background Color of our "Scene". L'immagine background. Sep 11, 2018 · AnchorPane class is a part of JavaFX. , styles. 0" onAction="#handleUserInput" prefHeight="41. Click the -fx -background-radius property name in the Properties column and you are taken to the corresponding online API documentation in the JavaFX CSS Reference Guide, which provides the syntax you can use with each property's value. Insets; import javafx. Jul 11, 2025 · Your All-in-One Learning Portal: GeeksforGeeks is a comprehensive educational platform that empowers learners across domains-spanning computer science and programming, school education, upskilling, commerce, software tools, competitive exams, and more. Mar 8, 2021 · Javafx: Bind ImageView to Anchorpane or VBox and scale the ImageView by resizing the scene Asked 3 years, 11 months ago Modified 3 years, 11 months ago Viewed 574 times Nov 25, 2022 · 如何使用 Scene Builder 将背景图像添加到 AnchorPane ? 我已经试过了: {代码} 我如何在 Scene Builder 中设置它。 以及生成的 FXML: {代码} 原文由 pen1993 发布,翻译遵循 CC BY-SA 4. Feb 23, 2023 · Somehow I still have a white background "filling" the rounded corners: I also tried to add another larger anchor pane with -fx-background-color: transparent as root pane (as shown here) and place the current root pane on that but it seems like the root-panes-transparency is always white instead of transparent. Here we discuss the introduction, working, constructors, methods and examples of JavaFX AnchorPane. fxml file and add a stylesheets element before the end of the markup for the GridPane layout as shown in Example 4-8. Aug 11, 2022 · Could someone explain why I can't load image from field -fx-background-image inside SceneBuilder? Images for reference: SceneBuilder application I've found out that I can do that from a . 0" prefWidth="76. Mar 2, 2022 · How do I change the background color of this scene? what am I missing? I tried the following: This command actually resolves / has no error BUT it doesn't change the JavaFX has a rich set of extensions to CSS in support of features such as color derivation, property lookup, and multiple background colors and borders for a single node. For Enjoy the videos and music you love, upload original content, and share it all with friends, family, and the world on YouTube. scene May 20, 2020 · Learn how to create a SplitPane in JavaFX with this comprehensive guide. Status AnimationTimer Application Application. Constructors of the class: In this tutorial I will show you how to use the JavaFX AnchorPane. For developing purpose i put the external resources in the dist folder of the project, so the files are availiable. We will use the following CSS rules to set and style the background image. , Pane, AnchorPane, StackPane) inside of the StackPane, and apply the style to that nested container, hoping that it will resize to fit the ImageView: doesn't work because the nested container keeps its original size. com/channel/UChR9gNsMg5qOxtUZj8oZ3LA Follow us on Facebook :https://www Jan 16, 2013 · I have problems setting a background image of an anchor pane dynamically. This document describes the JavaFX Cascading Style Sheets (CSS) for JavaFX 24 and explains the styles, values, properties and associated grammar. Suppose, we have a node and we need to set an anchor to it from Dec 13, 2019 · As the title says I have created a root AnchorPane in which two AnchorPanes are placed the upper AnchorPane somehow gets rounded but in case of lower one, the upper side is rounded whereas the lowe JavaFX Scene Builder (Scene Builder) is a design tool for the JavaFX platform. You can target all AnchorPanes or specific ones using AnchorPane allows the edges of child nodes to be anchored to an offset from the anchor pane's edges. One of the most versatile and widely used layout panes is the `AnchorPane`. 2K views 7 years agoJavaFX AnchorPanemore This document describes the JavaFX Cascading Style Sheets (CSS) for JavaFX 20 and explains the styles, values, properties and associated grammar. 0 许可协议 Dec 2, 2015 · For modena. javafx. Here's how you can add a background image to an AnchorPane in JavaFX: AccessibleAction AccessibleAttribute AccessibleRole Accordion ActionEvent Affine Alert Alert. to/3HDA Oct 23, 2025 · <TextField fx:id="userInput" layoutY="558. It is achieved using multiple VBox and HBox How to add an image in Java Fx scene builder This document describes the JavaFX Cascading Style Sheets (CSS) for JavaFX 19 and explains the styles, values, properties and associated grammar. Thi AnchorPane allows the edges of child nodes to be anchored to an offset from the anchor pane's edges. root { -fx-background-image: url ("xxx. here is a AnchorPane allows the edges of child nodes to be anchored to an offset from the anchor pane's edges. Welcome to PixelFree Studio's tutorial on utilizing the Anchor Pane in JavaFX! In this comprehensive guide, we'll delve into the fundamental aspects of the A JavaFX ImageView node tutorial example explained#JavaFX #ImageView #node// ******************** Controller. Jul 25, 2016 · I’m new to JavaFX, but I added a background image to my AnchorPane without any coding whatsoever. It is your design canvas, and it contains a view of what you are designing. fxml file. javafx. This is a simple way to create a custom AnchorPane that can change its background image using FadeTransition. youtube. Users can drag and drop UI components to a work area, modify their properties, apply style sheets, and the FXML code for the layout that they are creating is automatically generated in the background. Instantiate the respective class of the required layout. Nov 21, 2017 · JavaFX AnchorPane9. AnchorPane?> <?import javafx. By default, when you create a new FXML file, the Content panel contains an AnchorPane element as the root Setting the background color of an AnchorPane in JavaFX using CSS is straightforward. The next two images illustrate the 1st issue I ran into. graphics, package: javafx. ) by using a Background object, which contains a BackgroundImage that specifies the image and its properties. In the world of JavaFX, creating modern and visually appealing desktop applications requires a solid understanding of layout management. Jul 31, 2017 · if you initialize a Background you would first initialize a BackgroundImage and a BackgroundImage needs an Image. awt. The class named Pane is the base class of all the layouts in JavaFX. rightAnchor="76. The JavaFX SDK provides several layout panes for the easy setup and management of classic layouts such as rows, columns, stacks, tiles, and others. png"); Image NavigationImage = new Image(NavImg. css. I created the buttons via scenebuilder and they are loaded to the cla Jun 11, 2021 · I want to know if it's possible to change this white part of the image with another color, let's say blue. It seems that AnchorPane does not allow transparent background, I've tried setting the css of the AnchorPane to -fx-background-color: rgba(255,0,255,0. Here's how you can do it: 1. We'll also add an application icon in this tutorial part. Jun 24, 2021 · This is the complete JavaFX Tutorial with examples. Jul 3, 2016 · I'm trying to add a background image to my AnchorPane in JavaFX using a stylesheet called Style. JavaFX Scene class has an observable list to hold all the required style sheets. I created a small program to showcase how we can create a resizable scene which means we have an anchorpane always centred went the window is resized. ScrollPane?> <?import javafx. I tried doing it by putting in the stylesheet of the Anchor Pane something like #AnchorPane { -fx-background-image: ( Oct 23, 2025 · <?xml version="1. 0 AnchorPane does not clip its content by default, so it is possible that childrens' bounds may extend outside its own bounds if the anchor pane is resized smaller than its preferred size. Inside the Scene the actual JavaFX nodes like AnchorPane, TextBox, etc. Every Background is comprised of fills and / or images. Probably because it contains anchorpane, and that anchorpane contains buttons? White background from scrollpane and red from anchorpane: Nov 15, 2018 · I have a 2 Nodes (One Text, the other a Circle) in a Pane, and that pane is within an AnchorPane. Open MainApp. java and replace the code with the following: Feb 2, 2024 · I need to set the relative path for the AnchorPane as the project will run on different PCs. AnchorPane inherits Pane class. I am having a problem adding a background image to a text area. . to/3ntxhpl My Laptop : https://amzn. Jan 25, 2016 · This is a JavaFX Layout example. The Content panel is the rectangular area that occupies the center of the JavaFX Scene Builder window. sun. Pane All Implemented Interfaces: Styleable, EventTarget Direct Known Subclasses: AnchorPane, BorderPane, DialogPane, FlowPane, GridPane, HBox, PopupControl. mainFxmlClass { #pane{ -fx-background-size: 1200 900; -fx-background-radius: 0 Level up your programming skills with exercises across 52 languages, and insightful discussion with our dedicated team of welcoming mentors. Ho scritto in di AccessibleAction AccessibleAttribute AccessibleRole Accordion ActionEvent Affine Alert Alert. AnchorPane lays out each managed child regardless of the child's visible property value; unmanaged children are ignored for all layout calculations. Table 3-2 describes the subcommands available when you select the View command from the Menu bar. 0" mnemonicParsing="false" onAction="#handleUserInput" prefHeight="41. Constructors of the class: In JavaFX, when using Scene Builder, you typically set background images or styles programmatically rather than directly in Scene Builder itself. Shrinking any other Pane except AnchorPane DOES shrink/move its children nodes except from ImageView nodes. Image to load images from hard drive or a network image sources. 1) ; but the white background still shows up. Open the fxml_example. You drag and drop UI components to a Content panel, and the FXML code for the layout that you are creating is automatically generated in the background. Oct 24, 2022 · In this JavaFx UI Tutorial, we will learn how to use anchor pane to position and size the controls in relation to the container's edges. As a window is resized, the layout pane automatically repositions and resizes the nodes that it contains according to the properties for the nodes. yy"); } It works. to/3cr90twMy Keyboard : https://amzn. The Constructors of class Image help you to load image data: Jun 16, 2017 · package application; import java. Background class sets the background of a region. Save MainWindow. geometry. Apr 28, 2025 · . Nov 22, 2020 · 文章浏览阅读1. AnchorPane allows the edges of child nodes to be anchored to an offset from the anchor pane's edges. bottomAnchor="1. Download the gray, linen-like image for the background in the background. Click on the Zero button and add the code to the style textArea -fx-background-radius: 0 0 0 25;. 2. The -fx-background-color (of the region chart-plot-background) class of JavaFX CSS is used to set the back ground color. In the constructor of the image you can define the requestedWith and requestedHeight. Neither list will ever be null, but either or both may be empty. 1) I edited my background picture with Photoshop, to get the size the same as my AnchorPane, 800 x 600 pixels. An AnchorPane lays out its children Oct 23, 2025 · Anchor ScrollPane Since we want to resize the chat both horizontally and vertically, we set the anchor pane constraints to all edges. leftAnchor="0. Defines properties describing how to render an image as the background to some Region. All I have in my fxml file is a AnchorPane with ImageView with contain the png image The UnlockCustom sample, which is included in the JavaFX Scene Builder samples bundle, illustrates the use of the <fx:root> element. Im trying to make a Battleship-game program in java eclipse but i'm stuck at a graphics problem. 5 Working with the Content Panel This chapter describes the Content panel of the JavaFX Scene Builder. track-background { -fx-background-color: WHITE; } In the first image, you can see the light gray surrounding (which I'm trying to set to transparent) the thumb, in the second image, it has been set to white using the track-background class. Than you. Inspired from “Scene Builder” and “Scenic View” applications, I have worked on building a “ Gradient Builder ” application, which will let the Nov 8, 2022 · I don't know what is the grey area and how to extend my Anchorpane to all over the screen Image the not unmaximized view is this image2 My Fxml is a bit messy with alot of an Anchorpanes but it was Oct 26, 2016 · I can not set transparent background in scrollpane. Using a Background Image Images can be used as the background for a layout pane by setting the background image properties. more In the world of JavaFX, creating modern and visually appealing desktop applications requires a solid understanding of layout management. In order to display images on JavaFX, you use ImageView class. TextField?> <?import javafx. Let's use class javafx. css fil Feb 22, 2016 · The JavaFX Scene Builder is a tool that lets you design JavaFX application user interfaces without coding. In JavaFX, an anchor pane is represented by a class named AnchorPane which is a part of javafx. Image; import javafx. Scene; import javafx. 4 e non riesco ad assegnare un'immagine di sfondo a un oggetto AnchorPane. TickMark Background BackgroundFill BackgroundImage BackgroundPosition is there a possibility to refer to an anchor pane in css? If the anchor pane happens to be the root, than it's ok: . The structure of my project is as follows: I want to place the photo logo. g. Gradients In JavaFXOne of the very interesting features of JavaFX is its ability to have gradients (Linear or Radial) to the background color of the nodes. Is there a way to make the background of the SplitPane transparent? AnchorPane Layout in JavaFX The Anchor Pane enables the anchoring of child node edges at a specified offset from the anchor pane's edges. 4. It is divided into the See: Description Package javafx. image. Apr 11, 2019 · I'm trying to put an image as a background in a JavaFX scene, but my code isn't working. In given code you fill the whole Scene with image, so I assume that you want to resize image to fill window. Jul 25, 2016 · 如何使用场景生成器将背景图像添加到AnchorPane?我试过这样做:-fx-background-image url('C:/Users/Documents/page_background. toURI(). css When I run the program I get the following warning: WARNING: com. toURL(). 0" encoding="UTF-8"?> <?import javafx. So I don't want to set a background color to my anchorpane, if I did that, after rectangle. Hello, is there a way to set background color to the titled pane? Using the setBackground and -fx-background-color doesn't appear to work. JavaFX Image JavaFX allows you to work with all popular image formats. TickMark Background BackgroundFill BackgroundImage BackgroundPosition Feb 27, 2015 · I'd like to do the reverse: I have a SplitPane inside an AnchorPane. CSSPar Oct 26, 2017 · I am working on a chatbot project in java and for the GUI I am using JavaFX, and IDE eclipse oxygen and scene builder 8. parser. Additionally, CSS can also be used to style JavaFX applications. Understand the layout, properties, and implementation steps for effective UI design. css (the default JavaFX look and feel definition in Java 8), a slight shaded background was introduced for all controls (and also to panes if a control is loaded). In this blog I am going to explain in detail about each gradient and its parameters. If the anchor pane has a border and/or padding set, the offsets will be measured from the inside edge of those insets. For example the css below applied to the StackPane containing your ImageView will provide a red border around your image: May 10, 2014 · How do I create a Pane and have a child Node put at the center? Lets say the Pane is 500 by 500 and the Node is an ImageView with a 200 by 200 Image ImageView view = new ImageView(); Image img = The JavaFX SDK provides several layout panes for the easy setup and management of classic layouts such as rows, columns, stacks, tiles, and others. In this JavaFX Video Tutorial we will explore how to change the Default Background Color of our "Scene". I tried all my best to help you to get started with JavaFX. Background class is immutable, so you can freely reuse the same Background on many different Regions. Dec 10, 2013 · And apply the effect css above to the StackPane, in addition to a background and padding on the StackPane. See this page for more info on working with the JavaFX Scene Graph. Button?> <?import javafx. Here's how you can add a background image to an AnchorPane in JavaFX: Using a Background Image Images can be used as the background for a layout pane by setting the background image properties. You can specify the image, size, position, and repetition in a style class. JavaFX has a rich set of extensions to CSS in support of features such as color derivation, property lookup, and multiple background colors and borders for a single node. CSSBridge, StackPane, TextFlow, TilePane, VBox @DefaultProperty (value ="children") public class Pane JavaFX has a rich set of extensions to CSS in support of features such as color derivation, property lookup, and multiple background colors and borders for a single node. Code f Aug 14, 2023 · The AnchorPane allows developers to create flexible and responsive UIs by anchoring UI components to specific positions within the container. While the functionality of AnchorPane is crucial for building user interfaces, the visual appeal of these panes also matters significantly. Aug 15, 2022 · I thought it might be useful to introduce you to the JavaFX Panes with simple code example. 0" AnchorPane. java ********************package application;impor Sep 18, 2017 · I am creating a small application in javafx. 0" encoding="UTF-8"?> <? Setting a background image in JavaFX FXML Nospaniol Code 312 subscribers Subscribe Oct 16, 2025 · In the world of JavaFX, AnchorPane is a commonly used layout pane that allows you to anchor its children to its edges. In this JavaFX tutorial we will explore how to change the Default Background Color of our "Scene". Oct 24, 2013 · Utilizzo Netbeans 7. The repeatX and repeatY properties define how the image is to be repeated in each direction. You can also check: My Mic : https://amzn. Accelerate your tech career with hands-on learning. INTROVideo series that briefly introduces the JAVAFX lifecycle, how nodes and FXML are the basis for layouts and controls within the GUI. layout, class: AnchorPane Mar 26, 2019 · For a GUI I'm making the minimize, maximize, close buttons similar to that of Spotify by using an anchorpane for each 'button'. There are 6 Panels in javaFX such as: BorderPane, StackPane, GridPane, FlowPane,TilePane and AnchorPane. A BackgroundImage must have an Image specified (it cannot be null). Place some other container (e. The AnchorPane has the gradient background I want, but the SplitPane is opaque. I also created a new blank file in Photoshop, same Learn how to add a background image to AnchorPane in JavaFX with Scene Builder, enhancing your GUI design and user experience. This tutorial demonstrates how to use FXML in JavaFX applications with practical examples. Add CSS Rules for AnchorPane: In your CSS file, add a rule targeting the AnchorPane element. This blog post will delve deep into the fundamental concepts of the `AnchorPane`, explore its usage methods, discuss common practices, and share best practices to help you master this In JavaFX, you can add a background image to a container (like a Pane, VBox, HBox, StackPane, etc. gif')我是如何在 Apr 2, 2014 · Hi, Using css I can set a background image to a javafx button with: -fx-background-image: url( Feb 20, 2013 · I am trying to create a splash screen like the example I've provded. This is part one of a seven-part tutorial about designing, programming and deploying an address application with JavaFX. That is what Scene Builder was designed for, not so? I think it’s the best thing since sliced bread. AlertType AmbientLight AnchorPane Animation Animation. -fx-background-color:black; -fx-background-radius: 25; -fx-padding: 10; Let’s now style out our Zero and Add buttons. are added. I want to set a background color so following is my FXML code . Oct 16, 2025 · In the world of JavaFX, AnchorPane is a commonly used layout pane that allows you to anchor its children to its edges. Every background is composed of several fills or background images but cannot be null but it may be empty. fxml and run to test your app out to see if it works when you resize the window. CSS (Cascading Style Sheets) provides a powerful way to style the background of an AnchorPane, enabling developers to create visually JavaFX has a rich set of extensions to CSS in support of features such as color derivation, property lookup, and multiple background colors and borders for a single node. Each layout pane class supports a different layout strategy for its children and applications may nest these layout panes to achieve the needed layout structure in the user interface. This JavaFX Scene Builder User Guide gives a high level overview and description of the different components of the JavaFX Scene Builder Sep 1, 2021 · Your All-in-One Learning Portal: GeeksforGeeks is a comprehensive educational platform that empowers learners across domains-spanning computer science and programming, school education, upskilling, commerce, software tools, competitive exams, and more. Setting background image and the color The -fx-background-image class of JavaFX CSS is used to set an image as a background to a chart. I'm using SceneBuilder for Java 8 to build th This is the first video in a new series where I will be going through the basic of UI design in JavaFX with CSS, in this video, we will be changing background colors and creating round edges on panes. 4w次。本文介绍如何在JavaFX中使用CSS设置舞台背景图片,并提供了一种通过代码直接设置背景图片的方法。文中还讨论了在IntelliJ IDEA环境中可能出现的路径错误提示问题,尽管这些提示出现,但实际运行时背景图片仍能正确显示。 Apr 19, 2014 · Learn how to set up a JavaFX project. Region javafx. Learn how to use the JavaFX Layout API and built-in layout containers (BorderPane, GridPane, FlowPane, TilePane, HBox, VBox, StackPane) to lay out and style the interface the for your JavaFX application. Feb 12, 2017 · Your AnchorPane is resizing when you resize Window. css). jpg file and add it to the fxmlexample folder. how I need to set background color <?xml version="1. Inside the Stage you add a Scene which can, of course, be switched out by another Scene. Each of the above mentioned layout is represented by a class and all these classes belongs to the package named javafx. 0" layoutY="558. Parameters Arc ArcTo ArcType AreaChart ArrayChangeListener AudioClip AudioEqualizer AudioSpectrumListener AudioTrack Axis Axis. Sep 4, 2018 · Background class is a part of JavaFX. Parent javafx. This setting, applied to a UI element, renders its background completely see-through, allowing for modern and visually appealing designs. JavaFX AnchorPane Tutorial for BeginnersIn this video, you will learn on how to use the JavaFX AnchorPane for beginners. AnchorPanes may be styled The below image illustrates a subcomponent which lies in AnchorPane and is anchored on the the left and right sides of AnchorPane. png si trona nel source package insieme alla classe che la utilizza. Apr 1, 2023 · Guide to JavaFX AnchorPane. Nov 29, 2013 · If I have an instance of a JavaFX object, say an AnchorPane, how do I switch its background/foreground color? I did a quick Google search and it turned up nothing, also by exploring its methods the. layout package. Anchored TextField, Send Button and ScrollPane: Alternatively, we Using a Background Image Images can be used as the background for a layout pane by setting the background image properties. to/3x1Pi0Z My Mouse : https://amzn. Feb 2, 2024 · Add a JavaFX Background Image Using CSS CSS is an abbreviation for Cascading Style Sheets and is used for styling web pages. The reason why I did this is I wanted to use the automatic scaling property that is a result of res How can i implement a transparent panel with non-transparent children in JavaFX 2? The effect i want to achieve is for example applied to menus in Blender: The menu-panel / window is transparent, b Jul 24, 2015 · Although, I ran into some issues. Create a CSS file: First, create a CSS file (e. 1. Please refer to JavaFX CSS Reference for a complete description of the CSS rules for styling the background of a Region. JavaFX contains several layout-related classes, which are the topic of discussion in this example. We will discuss several techniques we can use this to do this, and how to apply various Hello, is there a way to set background color to the titled pane? Using the setBackground and -fx-background-color doesn't appear to work. This is where you will define the styles for your JavaFX elements. Simply drag and drop the image. Jul 23, 2017 · I'm trying to get round bottom corners in my application, but the result is this: This is the CSS file: . Mar 12, 2015 · How do i programmatically make a Node's background transparent-(see through); I am currently playing with AnchorPane as a parent Node to other ProgressIndicator and other nodes as children, and i w declaration: module: javafx. In this article, we will explore the concepts of the JavaFX AnchorPane and provide comprehensive code examples to demonstrate its usage. At the same time we enable Fit To Width so that the contents within the ScrollPane resize as well. scene. Each defined BackgroundFill is rendered in order, followed by each defined BackgroundImage. Aug 15, 2022 · Once done, we are in the position to style our AnchorPane. But if not, then how to do THIS VIDEO IS FOR EDUCATIONAL PURPOSES ONLY!Follow us on Youtube :https://www. layout. BackgroundImage; import javafx. 0" prefWidth="324.