0

I want remove the arrows of a JavaFX Spinner. I read how to remove the arrows of MenuButton in this link using CSS...but can't figure out how to do in my case .

remove arrows from menubutton

Any idea how ..thanks .

Mohd
  • 191
  • 3
  • 14
  • According to the [documentation](https://docs.oracle.com/javase/9/docs/api/javafx/scene/doc-files/cssref.html#spinner), the relevant CSS selectors are `.spinner .increment-arrow-button`, `.spinner .increment-arrow-button .increment-arrow`, and similarly with "increment" replaced by "decrement". Did you try setting the padding to zero for those? – James_D Nov 21 '17 at 14:13

1 Answers1

0

If you want to hide the array shapes you could do the same as the post you mentioned. The CSS properties you are looking for are :

.spinner .increment-arrow-button .increment-arrow {
    -fx-padding: 0;
}

.spinner .decrement-arrow-button .decrement-arrow {
    -fx-padding: 0;
}

If you don't want to alter their size by changing the padding you could set Shape to something non visible or just change it's background color to -fx-background-color: transparent;

JKostikiadis
  • 2,847
  • 2
  • 22
  • 34
  • ...@JKostikiadis...Thank You...it worked. yes setting the padding is the way, what I was missing is the formula .decrement-arrow-button .decrement-arrow ..and you provide it...thanks again :) – Mohd Nov 21 '17 at 14:43
  • @Mohd in case you are looking where to find those CSS rules here you are : https://gist.github.com/maxd/63691840fc372f22f470 – JKostikiadis Nov 21 '17 at 14:49