I added a child like this inside of a CCLayer:
[self addChild:object1];
Later on I want to remove that object from the children. Ummm so how do I do that? Thanks.
var s1:Sprite = new Sprite();
var s2:Sprite = new Sprite();
var s3:Sprite = new Sprite();
s2.addChild(s3);
s1.addChild(s2);
how can I find the coordinate of child in its parent's coordinate system?
My question is :
I want to know when does a xLayout (or ViewGroup in general) add a child view from XML ? And by "when" I mean at what point of code, in what "pass" of the "traversal" of the UI toolkit ?
Which method of xLayout or ViewGroup should I override ?
I have done my homework : I have watched the "Writing Custom Views For Android" presented (by Adam Powell and Romain Guy) in the last Google I/O and I have read Adam Powell comments on this Google+ post.
I am trying to have a datagridview with two comboboxes, a company name and a supplier account number.
When a company name is selected the relevant supplier account numbers (a company can have more than one supplier account) should be filtered for that company in that row.
I have a datagridview with two bindingsources: supplierBindingSource and companyBindingSource and the Supplier account combobox uses the supplierBindingSource for its datasource and company name uses the companyBindingSource for its datasource.
A company can have a supplier and/or customer account so the supplierBindingSource is a child or a companyBindingSource.
The supplier accounts correctly filter based on the selected company name however when another company name is selected in another row all the supplier accounts are filtered for that company.
Saving still works properly, regardless of what the combo box show but currently it is very confusing for a user to select a supplier account when the labels don't show what is being saved. Is it possible to have only the selected row to filter based on the company name rather than every row?
EDIT: Thanks to the answer from http://social.msdn.microsoft.com/Forums/windows/en-US/b23d9e8f-a00a-49ba-adf5-52d87c1b2890/parent-child-comboboxes-in-datagridview
I have been able to make some progress. The supplier account gets filtered when the drop down box is selected and restored to the full list when selection is finished.
However now I am trying to have the company selected (and not filtered) when a supplier account is selected.
The issue I've run into now is that I can get the companyID (which is the valuemember for the company combobox) but I cannot select the appropriate company without just setting the value of the combobox to the companyID which displays the companyID instead of the company name.
Is there a way to select the company using the companyID while preserving the displaymember/valuemember dynamic?
EDIT 2: The wall of text may be off putting. Some code to help elucidate my issue
DataGridViewComboBoxCell dgcb2 = (DataGridViewComboBoxCell)sdgvSalesOrderLines[cmbSupplierName.Index, e.RowIndex];
var companyID = col.FirstOrDefault(c => c.AccountID == Convert.ToInt32(dgcb.Value)).CompanyID;
dgcb2.Value = companyID.toString();
The second line gets the companyID and that works just fine, the final line sets the combobox to display the companyID whereas I would like it to set the valuemember value to companyID so that it would display the corresponding company name.
I can set the second line to give me the company name instead but if the value of the combobox isn't the companyID then the supplier account cannot filter based on the company selected.
Given a maven project with a parent POM - including mostly plugin and dependency versions - how can I generate a POM which takes the information from the parent, places it into the child and removes the reference to the parent?
Ideally this would be done with the maven-assembly-plugin.
Update: I need this done automatically, since manually it's boring and tedious.
Update 2: I'm preparing the source code for an external and want to deliver only one project, not the whole family.
Hi
this is probably something really simple but I cant see what!
Any images I have in a masterpage aint showing in child pages,
all i get is the box with the red cross in it.
Dont think Ive done anything different from usual and its not something thats
happened in other sites so im kinda scratchin my head with it.
Any ideas appreciated!
thanks
DD
So I have a file stream from a parent process to a child - and most of the time it works fine. However, when reading from it multiple times quickly, using fgets() will return NULL and the error is set to "resource temporarily unavailable". The problem is intermittent - and running the script that does the reads will sometimes have fgets return NULL and sometimes wont.
Could anyone help me stop this error from happening? Thanks!
How I have make project which have master and childs record it also have filterion criteria now I want to validate the delation of these child record base on master record How I can do it in asp.net
I have TabHost with tab child like this:
tabHost.addTab(tabHost.newTabSpec("web")
.setIndicator("web")
.setContent(new Intent(this, webview.class)));
In WebView class, I startactivityforresult:
startActivityForResult(new Intent(Webview.this,EventManage.class),GET_CODE);
In Eventmanage class, I set result but can not capture result in webview class.
Anybody can help me with this problem?
I have an unordered list and each li makes up one item in a two column layout:
col1 col2
1 2
3 4
5 6
7 8
9 10
11 12
I need to have an alternating background colour for each item BUT NOT so each item in one column is the same.
So :
1,4,5,8,9,11 will have one colour; and
2,3,6,7,10,12 will have another colour.
Can this be achieved with one :nth-child rule?
Thanks!
Hi,
I'd like to get the # of immediate children an element has, and then get the class of a child at a particular index. Something like:
var index = 25;
var children = $("#myListElement").children();
if (index < children.length) {
if (children[index].hasClass("testClass")) {
alert("hi!");
}
}
I think the syntax for .children() is ok, but how do I get the indexed element out of them in jquery style?
Thanks
I want to perform some action on elements that are not direct child of the body. How can I check a particular element to know whether its partent is the body.
Thanks!
Hi All,
i am having a user table which has desname as FK referring to des table ,i am trying to add desname in user but i am gettng Cannot add or update a child row: a foreign key constraint fails error.
desname is prepopulated and i am selected the same for he user.Where i am doing wrong
I ma using mysql and hibernate hbm
Hello,
I am working on Silverlight project.
I added a custom user control (Say, control1) which has a text box and button to a xaml page (Say, Page1).
Now what I want to do is when users clicks on the button, i want to pass the value in the textbox to Page1 and do something.
So basically, I am looking for a way to pass back a value from child to parent page in Silverlight.
Thank you.
I am currently playing around with jqueries drag and drop, basically I currently have a div (.drag_check) that holds a checkbox, I have the drag and drop working but I want to alert out the checkbox's ID once the element is dropped, I assume I have to use child but all my attempts have returned 'undefined'. Below is my code,
$('.drag_check').draggable({
containment: 'document',
opacity:0.6,
revert: 'invalid',
helper: 'clone',
zIndex: 100
});
$("ul.searchPage").droppable({
drop:
function(e, ui) {
var param = $(ui.draggable).attr('class')
addlist(param)
alert(param)
}
})
I want to find all nodes in a xml file that have a certain tag-name, lets say "foo".
If those foo-tags have them thelves child nodes with node-name "bar", then I want to remove those nodes. The result should be written to a file.
// remove this one
// don't remove this one
Thanx for any hints. As the tag indicates, I would like to do this with python.
I have a scenario in which I need a self reference property as follow:
class Post(db.Model):
creator = db.UserProperty()
post_title = db.StringProperty(required=True)
post_status = db.StringProperty(required=True, choices=['draft', 'published'])
post_parent = db.SelfReferenceProperty()
Now, I want ensure that an entity shouldn't be its own parent and a child of an entity cannot be its parent. How can I ensure this kind of a relationship in the PostForm model form and the Post model.
Is it possible to use the criteria api to load a set of parent objects along with a filtered, eagerly loaded set of child objects? I'm trying to query a list of categories and at the same time load the categories products that start with the letter M. The query below gives me the results I want but the Products are not eagerly loaded, that is NHibernate performs additional queries when I enumerate the Product collection:
var categoriesWithProducts = session.CreateCriteria<Category>()
.SetFetchMode("Products", FetchMode.Eager)
.CreateCriteria("Products")
.Add(Expression.Like("Name", "M%"))
.List<Category>();
What am I missing here?
I wanted to write if/for each statement that will get me all the child node where the rootNode = "home"
this is what i have so far
if (topLevelNode.Title == "Home")
{
var topLevelNodes = SiteMap......
}
foreach (SiteMapNode node in topLevelNodes)
{
...........................
}
ok i have the view in which there is a list. every record in the list have some child records . when i click on the details link . i want the records to be displayed in the table below. what mechanism i should follow. i want some way to trigger the table below?
There is same problem related with icon. I am satisfy with your answer that seticon property to false. But my form is child of MDI form, then this problem is remain same that icon is not remove.
Can you help me.
I have a windows form with two child controls. I need to highlight both the controls at the same time using c#. Please suggest me how to solve this problem.
Hi All,
i am trying to figure out how to write a linq query that will return a child collections "name" property as a string.
I have a BO that has a "options" property where the options are the "name" property of each option in an "order" object.
I would like the result to look something like
order.id = 12312
order.date = 12/03/10
order.options = "Option 1 Name, Option 2 Name, Option 3 Name"
I hope this makes sense. thanks for any and all help!
I don't have access to my dev environment, but when I write the below:
interface IExample
void Test (HtmlControl ctrl);
class Example : IExample
{
public void Test (HtmlTextArea area) { }
I get an error stating the methods in the class implementation don't match the interface - so this is not possible. HtmlTextArea is a child class of HtmlControl, is there no way this is possible? I tried with .NET 3.5, but .NET 4.0 may be different (I am interested in any solution with either framework).
Thanks