I have an XtraTreeView control that I've upgraded from 9.2 to 10.2. The hierarchy used to be displayed in the 'classic way' - ie. + to expand, - to collapse, like in this picture: http://documentation.devexpress.com/HelpResource.ashx?help=WindowsForms&document=img1103.jpg
However, in 10.2, they've changed it so the + has been replaced by > (like the play button on a remote) to expand and v to collapse. Any way to revert it?
You should change the TreeList's LookAndFeel property to resolve this problem. For example:
LookAndFeel.UseDefaultLookAndFeel = false;
LookAndFeel.SkinName = "Caramel";
Related
I'm currently trying to make myself familiar with the Radical menu subsystem of Awesome Window Manager. I want to create a simple menu like the ones you could also make with awful.menu. My code looks like this (of course this is not the complete config file, but the relevant parts of it):
local radical = require("radical")
local menu = radical.context {
style = radical.style.classic,
item_style = radical.item.style.arrow_single ,
layout = radical.layout.vertical,
}
menu:add_item {text="Item 1"}
menu:add_item {text="Item 2"}
menu:add_item {text="Item 3"}
local menutextbox = wibox.widget.textbox("Menu")
menutextbox:set_menu(menu, "button::pressed", 1)
I then include the menutextbox into my wibar. However, when I click on it, the menu always opens in the upper left corner. I tried to set the position manually with menu.x and menu.y, but this didn't change anything. So, how can I change the position of the menu from the corner to the widget which opens it?
Better report a bug in the project repository with your Awesome version. Given the lack of effort to keep up with the newer Awesome changes, it might very well just be broken for your version.
I have a (local) branch with some newer fixes for Awesome v4.3, but it still has some regressions.
I have a table with cell ids of "quest_row1", "quest_row2", etc. I want to change the background color of a cell to a hex value that I am returning via AJAX call to server.
picked_answer = $(this).val();
x = parseInt($("input#q_num").val());
$.post("CCRN/submit_answer.php", {num : x, answer:picked_answer}, function(data)
{
alert(data+x);
$("#quest_row" + x).css({'background-color' : '#' + data});
});
x gets the correct value, say 10. data is returned from AJAX call is correct, say AABBCC. The color does not change but I get no errors. This code does run as the alert box shows the correct values for the data and x. Please help identify my issue!
First check if the css style is added to the element via firebug or what ever console your using. In firebug when you inspect it, it should show as element.style{...}
It may also be that your adding it to the tr which might not work as i know styling tables does not always work as expected. Try adding the style to the td instead and see if this helps.
I'm using watir-webdriver with chrome to automate my tests and I'm kinda stuck now.
I have a form inside a facebox(defunkt.io/facebox). There are many checkboxes inside this form as you can see:
irb(main):113:0> b.checkboxes.size
=> 122
My problem is when i try to set one of this checkboxes I get the following error:
irb(main):111:0> b.checkbox(:id => 'week_0').set 1
Selenium::WebDriver::Error::UnknownError: Element is not clickable at point (-99999800, 242.5)
Backtrace:
0x8088d3a
0x8076225
0x807c718
0x807c9e7
0x807f6b7
0x808009d
0x8067c5c
0x8074931
0x8059fda
0x80d1d4d
0x80d3773
0x80d3aa3
start_thread [0x5e9e99]
0x10b973e
from /usr/local/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.14.0/lib/selenium/webdriver/remote/response.rb:50:in `assert_ok'
from /usr/local/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.14.0/lib/selenium/webdriver/remote/response.rb:15:in `initialize'
from /usr/local/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.14.0/lib/selenium/webdriver/remote/http/common.rb:58:in `new'
from /usr/local/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.14.0/lib/selenium/webdriver/remote/http/common.rb:58:in `create_response'
from /usr/local/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.14.0/lib/selenium/webdriver/remote/http/default.rb:64:in `request'
from /usr/local/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.14.0/lib/selenium/webdriver/remote/http/common.rb:39:in `call'
from /usr/local/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.14.0/lib/selenium/webdriver/remote/bridge.rb:450:in `raw_execute'
from /usr/local/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.14.0/lib/selenium/webdriver/remote/bridge.rb:428:in `execute'
from /usr/local/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.14.0/lib/selenium/webdriver/remote/bridge.rb:264:in `clickElement'
from /usr/local/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.14.0/lib/selenium/webdriver/common/element.rb:34:in `click'
from /usr/local/lib/ruby/gems/1.9.1/gems/watir-webdriver-0.3.9/lib/watir-webdriver/elements/checkbox.rb:25:in `set'
from (irb):111
from /usr/local/bin/irb:12:in `<main>'
What should I do to handle facebox with watir-webdriver on chrome?
EDIT:
I found the problem with a TIP from Chuck (look elements attribute at inspect element tool).
So I noticed the checkboxes had -999999px left position.
Solution:
browser.execute_script("$('[type=checkbox]').removeClass('ui-helper-hidden-accessible')")
(since this was the class that was causing the left negative shift)
I found the problem with a TIP from Chuck (look elements attribute at inspect element tool). So I noticed the checkboxes had -999999px left position.
Solution:
browser.execute_script("$('[type=checkbox]').removeClass('ui-helper-hidden-accessible')")
(since this was the class that was causing the left negative shift)
The error makes me think the thing may not be visible or active somehow. Is the script actually displaying the lightbox at the time it tries to interact with it? Do you need to insert a brief pause or wait for the checkbox to get rendered and the javascript code that 'pops up' the lightbox to finish it's thing?
If it is not visible then I could see it producing an error of the sort you are getting.
Likewise if the script is just going a little too quick, that could be the issue also.
Use the developer tools (in chrome you can right click an element and choose 'inspect element') and look at the properties (specifically position) of the element in question, and the elements further up the 'tree' (as it were) that contain it.
You might be able to brute force around this by changing the class, or altering the CSS for the class to temporarily to 'relocate' the object such that Watir believes it is visible. I've had to do something similar for stuff that used the hover state to hide or show menus, where for whatever reason 'onmouseover' events were not good enough for the browser to apply a different css psuedoclass. If you are already using jquery there's some pretty simple functions that can be called to do that sort of thing. (one of your devs might be able to help you out with it) You can use .execute_script to invoke code like that if it's needed.
Try this. It will move the element into view using Javascript. Worked for me.
module Watir
class Element
def move_into_view
browser.execute_script(%Q[
var element = arguments[0];
element.style.position = 'absolute';
element.style.left = '10px';
element.style.top = '10px';
return true;],
self )
end
end
end
I am working with the Mojo SDK and I'am trying to add a background image to a div but havn't been able to find a way to do it.
Obviously I have tried doing it the normal CSS-way but it doesn't seem to work with Mojo.
Here is the latest thing I tried:
var t=document.getElementById("kblayoutdiv");
t.parentNode.removeChild(t);
var t=document.getElementsByTagName("BODY")[0];
var div=document.createElement("div");
div.style.position="fixed";
div.id="kblayoutdiv";
div.style.display="block";
div.style.top="80%";
div.style.left="92%";
div.style.width="16px";
div.style.height = "11px";
div.style.background = url('/usr/palm/frameworks/mojo/keyb_en-us.png');
div.style.zIndex = "255";
t.appendChild(div);
window.kblayout="en";
I have tried several solutions to get the background image to show.
The rest is working fine. It is just the background iamge that won't show no matter what.
So if anyone can show me the piece of code to add the background image I'd be real happy :)
div.style.background = url('/usr/palm/frameworks/mojo/keyb_en-us.png');
You have to quote strings in JavaScript
div.style.background = "url('/usr/palm/frameworks/mojo/keyb_en-us.png')";
Obviously, the URI has to be correct as well.
That said, as a rule of thumb, it is almost always better to predefine all your styles in an external stylesheet and generate elements that match the selectors (e.g. by setting .className).
I have a 2.0 framework ASP.Net page that runs in our controled environment (IE 7).
The dialogWidth property seems not to be working. The scrip is as follows:
var win = window.showModalDialog ('Page.aspx', 'PopupPage', 'dialogHeight:600px,dialogWidth:800px,resizable:0');
The dialogHeight works fine but no matter what I change the dialogWidth to - it seems to be limited to a width of about 250px. In the configuration above the modal popup is higher that it is wide - even though width is 800 and height is 600.
The options must be delimited by semicolons, not commas.
var win = window.showModalDialog ('Page.aspx', 'PopupPage', 'dialogHeight:600px; dialogWidth:800px; resizable:0');
Try this:
var returnValue = window.showModalDialog(sUrl,'','unadorned:yes;resizable:1;
dialogHeight:550px;dialogwidth:985px;scroll:no;status=no');
Someone I work with had the same problem, and this fixed his problem...