Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [e4-dev] scroll bar in swt in eclipse 4

yes the theming is done via external css stylesheets. it is done within the extensions tab using the 'org.eclipse.e4.ui.css.swt.theme'. I have a tab in which you choose to change the theme from default to blue. But theming will not work with the scrollbar. 
 
Ann.
 
'package de.vogella.e4.todo.handler;

import javax.inject.Named;

import org.eclipse.e4.core.di.annotations.Execute;
import org.eclipse.e4.ui.css.swt.theme.IThemeEngine;
import org.eclipse.e4.ui.workbench.IWorkbench;


public class ThemeSwitchHandler {
@Execute
public void switchTheme(IThemeEngine engine) {
engine.setTheme("de.vogella.e4.todo.redtheme", true);
}
}

"css/red.css".

				
CTabItem, ToolBar, Button, CBanner, CoolBar {
	font-size: 9;
	background-color: red;
}

 

On Mon, Jul 18, 2011 at 11:37 AM, Paul Webster <pwebster@xxxxxxxxxxxxxxxxxxx> wrote:
Hi Ann,

On Sat, Jul 16, 2011 at 2:03 PM, Ann Smith <annsmith.smith38@xxxxxxxxx> wrote:
Hi,

I am trying to add a scroll bar to one of my composites but I am
having problems because when I add the scroll bar as follows:
       "final Composite first= new Composite(parent, SWT.BORDER);
               first.setBounds(0, 0, 200, 100);
               final StackLayout layout = new StackLayout();
               first.setLayout(layout);

               final Composite firstpg= new Composite(first, SWT.V_SCROLL);"

it displays the scroll bar but the color that i have set using my
themeing will not work.


Was the theme set using CSS?  Could you provide the snippet of the theme in question?

Thanx,
PW


--
Paul Webster
Hi floor.  Make me a sammich! - GIR

_______________________________________________
e4-dev mailing list
e4-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/e4-dev



Back to the top