Changing default zoom control in GEF editor (combobox) to slider
-
29-06-2021 - |
Frage
I'm working on an Eclipse editor based on GEF. I've added a zoom control for the editor, but I want it to look differently (specifically, I want it to be slider instead of a combobox). Does anyone knows how can I do this? Thanks in advance, Daniel
Lösung
It's easy, just override the
org.eclipse.gef.ui.actions.ZoomComboContributionItem.createControl(Composite)
to create a slider, and call
org.eclipse.gef.editparts.ZoomManager.setZoomAsText(String)
with correct parameters.
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow