Fork me on GitHub

Announcement

The oneye project has been discontinued. You might not expect further fixes and support from us. All community related systems are set to read-only mode. Though feel free to download and use oneye as-is or even fork it over at GitHub.

#1 2012-04-12 17:28:11

hedede
Member
Registered: 2012-04-12
Posts: 2

How to make a window widget always on top of other windows on eyeos?

I use oneye 0.8.0 (1.10.0.1). How can I make a window widget always on top of other windows on eyeos?

Offline

#2 2012-04-12 22:24:21

lars-sh
Administrator
From: near Hamburg, Germany
Registered: 2011-07-14
Posts: 731
Website

Re: How to make a window widget always on top of other windows on eyeos?

When creating the window, set "noZindex" to true and afterwards you need to set the style.zindex value to something wuite high using JavaScript. Something like the following:

global $myPid;
$myWindow = new Window(array(
	'test' => 'myApp_myWindow',
	'noZindex' => true
));
$myWindow->show();
eyex('rawjs', array('js' => 'xZIndex("' . $myPid . '_' . $myWindow->name . '", 999999);'));

EDITED: Fixed.


Best regards,
Lars Knickrehm

The oneye project.

Offline

#3 2012-04-12 22:58:56

hedede
Member
Registered: 2012-04-12
Posts: 2

Re: How to make a window widget always on top of other windows on eyeos?

Thanks for the response. However, the below code help me to keep the window always in background smile I also tried the negative value (-999999), but it didn't help. Do you think I am doing somwthing wrong?

function theapp_run($params=null) {
	$myWindow = new Window(array(
		'name'=>'wnd1',
		'title'=>'theapp',
		'father'=>'eyeApps',
		'style' =>TITLE+LISTED+CLOSE+MIN,
		'width'=>800,
		'height'=>455,
		'cent'=>1,
		'savePosition'=>1,
		'noZindex' => true
	));
	$myWindow->show();
	eyex('runjs', array('js' => 'xZindex("' . $myPid . '_' . $myWindow->name . '",999999);'));
	$homepage = '[url]https://www.domain.com/[/url]';
	$myFrame = new Iframe(array(
		'name'=>'##H3OTITLE#',
		'father'=>'wnd1_Content',
		'x'=>10,
		'y'=>1,
		'height'=>$myWindow->height-40,
		'width'=>$myWindow->width-20,
		'url'=>$homepage
	));
	$myFrame->show();
}

Offline

#4 2012-04-13 12:05:21

lars-sh
Administrator
From: near Hamburg, Germany
Registered: 2011-07-14
Posts: 731
Website

Re: How to make a window widget always on top of other windows on eyeos?

I'm sorry, it's not "xZindex", but "xZIndex" and please, don't forget to initialize the global var $myPid!

function theapp_run($params = null) {
	global $myPid;
	$myWindow = new Window(array(
		'name'=>'wnd1',
		'title'=>'theapp',
		'father'=>'eyeApps',
		'style' =>TITLE+LISTED+CLOSE+MIN,
		'width'=>800,
		'height'=>455,
		'cent'=>1,
		'savePosition'=>1,
		'noZindex' => true
	));
	$myWindow->show();
	eyex('rawjs', array('js' => 'xZIndex("' . $myPid . '_' . $myWindow->name . '", 999999);'));
	$homepage = '[url]https://www.domain.com/[/url]';
	$myFrame = new Iframe(array(
		'name'=>'##H3OTITLE#',
		'father'=>'wnd1_Content',
		'x'=>10,
		'y'=>1,
		'height'=>$myWindow->height-40,
		'width'=>$myWindow->width-20,
		'url'=>$homepage
	));
	$myFrame->show();
}

Best regards,
Lars Knickrehm

The oneye project.

Offline

Board footer

Powered by FluxBB