Questions tagged [inlines]

55 questions
3
votes
2 answers

How can I get the whole text content from a Paragraph(System.Windows.Documents)?

I think the question title is self explaining enough. I've added some strings via ParagraphControl.Inlines.Add(SomeStringValue) and I'm getting some troubles retrieving the text content. Any tip? I've tried to get the text from the Inline itself and…
Miguel A. Arilla
  • 5,058
  • 1
  • 14
  • 27
3
votes
2 answers

django: Override get_Form inlines

I want to override the get_form in a tabular admin in order to filter by current user. The thing is that I'm getting a error: object has no attribute 'current_user' Admin.py class InvoiceDetail(admin.TabularAdmin): form = InvoiceDetailForm …
NeDiaz
  • 349
  • 3
  • 14
3
votes
1 answer

WPF RichTextBox automatically merges two adjacent Runs

I have a RichTextBox containing two Runs:
undermind
  • 1,779
  • 13
  • 33
3
votes
1 answer

How to deal with multiple sub-type of one super-type in Django admin

What would be the best solution for adding/editing multiple sub-types. E.g a super-type class Contact with sub-type class Client and sub-type class Supplier. The way shown here works, but when you edit a Contact you get both inlines i.e. sub-type…
Henri
  • 875
  • 2
  • 14
  • 22
2
votes
1 answer

How to edit inline objects with reverse generic relation in Admin Panel?

I would like to be able to add inline Image objects to Gallery in Admin (as I try it in admin.py below). Problem is that Image model doesn't have content_type field. It raises exception. I would like to do the same with Videos objects. Here are my…
Memke
  • 684
  • 1
  • 7
  • 24
2
votes
0 answers

How to make all the 'inlines' collapsible items in Django Admin to default open?

I am new to Django and Python programming and I have looking in circles to solve this problem I have. I wrote following codes...whenever the below codes were executed, the inline filter is always default as 'close'. How can I default to 'open' or…
joecool
  • 21
  • 1
2
votes
2 answers

How to iterate formsets with inline structure

I face up with the problem of inability to iterate through my formsets. I have already create an inline structure between Client model(form) and Phone model(formset). My aim is to be able to store more than one phone for each client. The issue is…
gtopal
  • 544
  • 1
  • 9
  • 35
2
votes
1 answer

Django Admin conditional display inlines based on models property

I've got marketplace models with fields: class VacationEvent(models.Model): user = models.ForeignKey(User, on_delete=models.CASCADE) process_fba = models.BooleanField(default=True) @property def has_amazon_fba_vacation(self): …
Stanislav
  • 67
  • 2
  • 8
2
votes
1 answer

Inlines in Django Admin

I have two models, Order and UserProfile. Each Order has a ForeignKey to UserProfile, to associate it with that user. On the django admin page for each Order, I'd like to display the UserProfile associated with it, for easy processing of…
Oli
  • 1,003
  • 7
  • 17
2
votes
2 answers

WPF C# Programmatically adding Styles from Resource Dictionary?

I am new to this website and new to programming and I have encountered a problem. I am using Visual Studio 2010, C# WPF Application. I have this line of code in my program: TextBlock.Inlines.Add (new Run("text"){ Foreground =…
Darren A.
  • 77
  • 2
  • 6
2
votes
1 answer

Read C# Textblock Text Property filled using Inlines

Let us say that I have an empty Textblock : textblock1.Text = ""; Then I only put Inlines content in it with these two statements: textblock1.Inlines.Add(new Run() { Text = "A. ", Foreground = Brushes.Red }); textblock1.Inlines.Add(new Run() {…
tobiak777
  • 3,175
  • 1
  • 32
  • 44
1
vote
1 answer

Style CheckBox text with inlines

I am trying to style text on a page that contains TextBlocks and TextBlocks as the content of CheckBoxes I want to do something like this (where textBlock is the TextBlock contained within the CheckBox - or anything that inherits from…
Josh
  • 23
  • 1
  • 6
1
vote
0 answers

Build Inline Formsets in Django Admin

So I am new to Django and I have been reading a lot of documentation to figure this out, I have a table called "Logs" that has logs of different positions (has FK of table "Position"), each position belongs to a department (has FK to table…
Mar1941
  • 91
  • 1
  • 10
1
vote
1 answer

Django inlines working on Dev server, yet not on Apache Test server?

I'm having an issue where the Inline Admin functionality is behaving differently in different environments. In Dev, when editing a technology I get a link at the bottom to add more Roll Modifiers as needed that works flawlessly. In Test, I get a…
Adam Luchjenbroers
  • 4,917
  • 2
  • 30
  • 35
1
vote
0 answers

Django inline has no ForeignKey but has one?

I want to try to add a ListField increasible on django admin. I discover I can do that with inlines, so I goes to the doc to find this code : models.py from django.db import models class Author(models.Model): name =…
Dad95
  • 11
  • 2