-
Notifications
You must be signed in to change notification settings - Fork 236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CodeArea in Tab #186
Comments
From your description, it seems more like a problem with TabPane than with RichTextFX to me. Do you think otherwise? |
The Problem is, that TabPane set its content invisible, if the Tab is not shown. |
I don´t know why, but I worked a littlebit and now its displayed... or not... Its just displayed sometimes, and sometimes not. I have no idea why, I will look for a reason... |
Now I found the difference. The CodeArea is displayed in Tabs, when it have no scrollbars. If there are any scrollbars and its not opened in the first tab, the content is not visible. So I don´t think, its a problem of Tabs. But I don´t know. |
Can you create a minimal self-contained test case that I can use to reproduce the problem? |
I uploaded it at my Webside (.zip is not allowed here). |
Thanks, but unfortunately I was not able to reproduce the problem. I simplified the example to a single java file. Could you please try to run this and report back whether you observe the same problem? import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Tab;
import javafx.scene.control.TabPane;
import javafx.stage.Stage;
import org.fxmisc.richtext.CodeArea;
public class RichTextFXInTabPane extends Application {
// generate some text
private static final String TEXT1, TEXT2;
static {
StringBuilder sb1 = new StringBuilder();
StringBuilder sb2 = new StringBuilder();
for(int i = 0; i < 100; ++i) {
for(int j = 100; j > i; --j) {
sb1.append(i);
sb2.append(100-i);
}
sb1.append("\n");
sb2.append("\n");
}
TEXT1 = sb1.toString();
TEXT2 = sb2.toString();
}
public static void main(String[] args) {
launch(args);
}
@Override
public void start(Stage primaryStage) throws Exception{
TabPane pane = new TabPane(
new Tab("tab1", new CodeArea(TEXT1)),
new Tab("tab2", new CodeArea(TEXT2)));
primaryStage.setScene(new Scene(pane, 800, 600));
primaryStage.show();
}
} |
|
Ok, didn´t saw that. I will update... thought I had the newest Version... |
Closing this as it doesn't seem to be an issue in JDK 8u40 and later. |
When I put CodeAreas in a Tab, the first Tab is shown correctly, the other Tabs with other CodeAreas show just the scrollbar, not the content. I think its the Problem, that they are marked at invisible and need to be set to visible (FIX: override setVisible, so that the content is visible, too)
Code:
The text was updated successfully, but these errors were encountered: