1

What I'm trying to do is to scale a popup content of a javafx.scene.control.DatePicker using javafx.scene.control.skin.DatePickerSkin to add an scale,

DatePickerSkin skin = new DatePickerSkin(datePickerFrom);
    skin.getPopupContent().getTransforms().add(new Scale(1.5,1.5,0,0));

By using this code, all I got is

It looks like the skin is generating another popup

I didn't found a way to input a skin instead of DatePicker and if there is a way to add a scale directly to the Datepicker

In this software, all items are getting scaled for the display sizes

in case you wanted the detailed code, I created this,

Stage stage = new Stage();
    DatePicker datePicker = new DatePicker();
    DatePickerSkin datePickerSkin = new DatePickerSkin(datePicker);
    datePickerSkin.getPopupContent().getTransforms().add(new Scale(1.5,1.5,0,0));
    Pane pane = new Pane();
    stage.setWidth(300);
    stage.setHeight(100);
    pane.getChildren().addAll(datePicker);
    Scene scene = new Scene(pane);
    stage.setScene(scene);
    stage.show();
  • please explain what you _really_ want to achieve and provide a [mcve] demonstrating how you tried to reach your goal and how/what's not working as required. – kleopatra May 06 '20 at 10:06
  • Thank you for the comment @kleopatra, I've added another detailed code example for you, please try to run it and you will see the issue I'm having – Charaka Janith May 06 '20 at 11:27
  • still unclear as to the why? And how/why do you do the _all items are getting scaled for the display sizes_ - typically, that's happening automagically. – kleopatra May 06 '20 at 11:47
  • @kleopatra You can ignore that part, just refer to the last code segment, all I need to do is increase the scale of the date picker (including the popup), as you can see in the image, the scaling works. but there are two popups opens at the same time, one small and one scale. that is what I need to fix. – Charaka Janith May 06 '20 at 11:53

0 Answers0