Questions tagged [component-design]
11 questions
7
votes
2 answers
Avoiding the need to call ProcessMessages
I've got a component I created that embeds a hardware-accelerated renderer in a TWinControl so you can place it on a form. It works pretty well in most cases, but if I try to resize the control, everything goes blank until the message loop runs and…

Mason Wheeler
- 82,511
- 50
- 270
- 477
6
votes
5 answers
Why won't my control accept keyboard input?
I've built a custom control that I'm trying to send input to. It will accept mouse input and report MouseDown, MouseMove and MouseUp correctly, but for whatever reason, it won't accept keyboard input. When I click on it, it doesn't receive focus,…

Mason Wheeler
- 82,511
- 50
- 270
- 477
4
votes
1 answer
How do I make a control that can't contain other controls?
I'm designing a custom control, and every time I have it highlighted in the form designer and then pick another control from the control palette, the new one ends up inside my control, as if it were a TPanel or TGroupBox. This isn't what I want, so…

Mason Wheeler
- 82,511
- 50
- 270
- 477
3
votes
0 answers
React Native overlapping views with elevation not work
I want to show button above card with elevation, but my problem is button goes behind card. If I remove elevation of card then button shows above card. I want both button above card and card with elevation. How can I achieve this?
Currently I put…

Vishal Jadav
- 924
- 9
- 11
3
votes
1 answer
Guidelines/principles for package and component design
Alright, our visual studio solution grows big in terms of the number of projects in it. Except for things that are obvious, I want to check whether the way it is now is what it has to be or we can better reorganize/package it.
Do you know of any…

tranmq
- 15,168
- 3
- 31
- 27
2
votes
1 answer
Creating a CSS Fill Utility for Flex Items?
I'm reviewing SUITCSS's design of a fill utility:
.u-sizeFill {
flex: 1 1 0% !important; /* 1 */
flex-basis: 0% !important; /* 2 */
}
This would be applied to flex that where we want them to fill up the remaining space.
Just want to see…

Ole
- 41,793
- 59
- 191
- 359
2
votes
0 answers
How would you design this component in Angular 6?
I have a rather basic question concerning proper component design.
I created a basic accordion component, which I'm using to display a title and a description. If the title is clicked, the description is displayed or hidden (toggled).
@Input()…

saglamcem
- 677
- 1
- 8
- 15
1
vote
1 answer
Dynamically attaching ES6 Object's methods from One object to another
I have this basic component class that looks like this
class Component {
constructor() {
this.manager = null;
}
behavior(){
//some behavior
}
}
I want an instance of GameObject to dynamically inherit that behavior…

xxfast
- 697
- 5
- 14
1
vote
0 answers
Referenced component does not update until restart visual studio 2015 update 2
Description:
I have two projects(for example); First project contains one Component class with [ToolBoxItem(true)] attribute added; Second project reference first project and uses designed component of First project.
Now, When I make any changes in…

Ehsan Mohammadi
- 415
- 4
- 15
0
votes
0 answers
Is It Possible to Make an Inherited/Custom Control (WinForms) Automatically Appear in VisualStudio's ToolBox, After Adding a Refernce to its DLL?
I am using Visual Studio 2008, with .NET Framework v3.5.
Consider this scenario:
You created a new Class Library project called "SomeDLL",
and in it you created 1 class, called "SpecialButton",
which inherits System.Windows.Forms.Button.
If you do…

spaceman
- 1,061
- 1
- 11
- 31
-1
votes
3 answers
ReactJS: What are some criteria for not needing a constructor in a component class?
I want to know the conditions where by a constructor is not needed in a component's class declaration. I figure it is for stateless components, but are there any other reasons? Would not having any functions inside the component (besides life cycle…

connected_user
- 814
- 1
- 9
- 25