Questions tagged [parent]

In an oriented tree, the parent is the previous node before the node of interest. The word parent can then be used in countless abstractions of computer science. The container of contained graphic or logic items can be called a parent. The inherited class in OOP can be called the parent.

2914 questions
20
votes
2 answers

Css equivalent of :has()

In the following example:
...
...
...
user3176519
  • 393
  • 1
  • 9
  • 16
20
votes
3 answers

How do I make Views fill the full width of their parent in my Android app?

I have the following layout defined for one of my Activities:
Alexander Trauzzi
  • 7,277
  • 13
  • 68
  • 112
20
votes
2 answers

jQuery .parent() select multiple levels up

I have a hierarchy like this:

What I am trying to do is to select the parent of the onFocus, but if I do this: $(function(){ …

Liftoff
  • 24,717
  • 13
  • 66
  • 119
20
votes
2 answers

python import module from parent package

I have the following directory structure foo/ __init__.py settings.py bar/ __init__.py myfile.py In myfile.py I have: import settings I get the following error: ImportError: No module named settings, why? How can I…
danielrvt
  • 10,177
  • 20
  • 80
  • 121
19
votes
6 answers

How to remove QWidgets from QSplitter

In my app have a window splitted by a QSplitter, and I need to remove an widget. How can I do that? I can't find useful methods
JuanDeLosMuertos
  • 4,532
  • 15
  • 55
  • 87
19
votes
1 answer

WPF Get parent window

Hy, In my MainWindow.xaml.cs file I made a getter to get the reference to my listbox. public ListBox LoggerList { get { return Logger; } } Now I want to access the LoggerList from a normal class but I don't work. I tried the…
user2644964
  • 763
  • 2
  • 10
  • 28
19
votes
1 answer

.parents() without jquery - or querySelectorAll for parents

Possible Duplicate: Check event.target.parentElement with matchesSelector js I have a dom object, I'd like to match its parents, all parents, against a selector, like querySelectAll(), but for parents instead of children. Similar to jQuery's…
Randy Hall
  • 7,716
  • 16
  • 73
  • 151
19
votes
1 answer

How to generate jar for maven parent project

Maven requires a parent project to have pom clause in the parent's pom.xml. When such a project installed, only a pom-file generated into the maven repository. Jar-file is not generated, no matter if the parent project has any…
Kallisto
  • 353
  • 1
  • 2
  • 10
19
votes
3 answers

JavaScript get parent element and write holder div for siblings

I have the following structure:
Content here
Content here
At onload, I want to include a "holder" div, that holds all the parent's children like so:
mika.el
  • 193
  • 1
  • 1
  • 4
18
votes
7 answers

Delete a child and a parent row with one SQL script

Instead of deleting the child row and then writing another sql statement to delete the parent row I wanted to use one statement which will do both. FYI: we use Oracle database. Update: I dont have a privilege to do DELETE ON CASCADE
WowBow
  • 7,137
  • 17
  • 65
  • 103
18
votes
1 answer

Angular property 'parentNode' does not exist on type 'EventTarget'

I'm trying to reach a parent of some element: let t = e.target.parentNode but i have this Error: Property 'parentNode' does not exist on type 'EventTarget' I've tried with e.target.parentNode but this also not gives me any results. Can…
Lukas
  • 7,384
  • 20
  • 72
  • 127
18
votes
3 answers

Qt: Multiple windows in a parent/child chain, parent does not close children?

I am trying to create multiple windows in a chain: window 1 is the parent of window 2, window 2 is the parent of window 3, etc. When I close one window, I would like all its children to close as well. Currently, if I close the top level window,…
ishmael
  • 1,796
  • 3
  • 18
  • 19
18
votes
3 answers

jQuery: parent() times 3 - how to avoid stacking of parents if I don't know a selector

I couldn't find a quick answer to this problem … I'm inside a click-event and using $(this) I'm trying to select an element three levels up without knowing what selector it has. $(this).parent().parent().parent().attr('id') This works fine, but is…
matt
  • 42,713
  • 103
  • 264
  • 397
18
votes
7 answers

Php - get parent-script name

parent.php: require_once 'child.php'; child.php: echo __FILE__; It will show '.../child.php' How can i get '.../parent.php'
Max Frai
  • 61,946
  • 78
  • 197
  • 306
18
votes
2 answers

WPF - Adopt size of parent

I'm trying to figure out the best way to size some controls but can't quite get it right. I have a window that adds on a custom control:
Ian
  • 33,605
  • 26
  • 118
  • 198