Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGL Development Tools » gridlayout background(Can gridlayout display a background image)
gridlayout background [message #901115] Thu, 09 August 2012 21:00 Go to next message
Nathan Reed is currently offline Nathan Reed
Messages: 74
Registered: June 2012
Member
Mac OSX 10.6.8
Eclipse Inidgo 3.7 2 bit
EGL 0.8.1

I am trying to display a background image in a widget on a gridlayout using a css class (code below). I do not see the image in design or preview.

My css file is in webcontent>css.
My image is in webcontent>css>icons.

I am using this path without issue in other code.

Is what I am trying to do possible (background image on gridlayout)? Or do I have a coding problem? Can anyone help with this?

package client;

import org.eclipse.edt.rui.widgets.GridLayout;

handler WelcomeBox type RUIWidget{targetWidget = welcomeGrid, onConstructionFunction = start, cssFile = "css/CuttingInstructions.css", @VEWidget{category = "Custom"}}
   
    welcomeGrid gridlayout{ rows = 5, columns = 1,
		height = 385,
		width = 655,
		class = "dialogpanelc",
		children = [  ]};

    function start()
    end
end


.dialogpanelc {
background-image: url("icons/dialogpanelc.jpg");
background-repeat: no-repeat;
}
Re: gridlayout background [message #903193 is a reply to message #901115] Wed, 22 August 2012 13:13 Go to previous messageGo to next message
James Caron is currently offline James Caron
Messages: 2
Registered: August 2012
Junior Member
I had a similar problem and my solution, although I'm not sure it applies, was to place the gridlayout in a Div and apply the css class to the div. You may also want to try applying the css directly to the widget in a style tag for testing to reduce the number of variables.
Re: gridlayout background [message #903197 is a reply to message #903193] Wed, 22 August 2012 13:25 Go to previous messageGo to next message
Nathan Reed is currently offline Nathan Reed
Messages: 74
Registered: June 2012
Member
James:

Thanks for the input.

I gave up on trying to place the background on the gridlayout. Thought I was doing that in RBD but now I do not remember.

I had already changed all my code to doing similar to what you suggest. My example used class but I was actually using style tag in my production.

Makes me wary of using any css at all regarding gridlayout.

Appreciate you responding,

Nathan Reed
Re: gridlayout background [message #903212 is a reply to message #901115] Wed, 22 August 2012 14:04 Go to previous message
Nathan Reed is currently offline Nathan Reed
Messages: 74
Registered: June 2012
Member
FYI:

This does work.

updateGrid GridLayout{ columns = 1, rows = 4, cellPadding = 4, children = [  ],
	width = 300,
	height = 300,
	background = "url(css/icons/loadingimage300x300.gif)" };


Thx,

Nathan Reed

[Updated on: Wed, 22 August 2012 14:05]

Report message to a moderator

Previous Topic:Contributing to the EDT project
Next Topic:Library List management call RPG Programs
Goto Forum:
  


Current Time: Fri Oct 31 08:43:14 GMT 2014

Powered by FUDForum. Page generated in 0.01788 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software