Questions tagged [programmatically-created]

Any object in an application created using a computer program rather than created manually using something in the userspace.

General Definition

Any object in an application created using a computer program rather than created manually using something in the userspace.

GUI Elements

In general, elements are declared in inside their accompanying tags in / files or in any other derivatives ( , , , , , and many others).

Programmatically created are those elements that are coded in contexts that need to be compiled to take effect at . They could be created at by a click of a as an example, where they would be coded inside a click listener for that .

438 questions
2
votes
2 answers

Creating a function programmatically

There are lots of interesting posts on this subject, but I seem to either not understand their answers, or aiming for something different. Here is what I am trying to do. I have two (or more) functions that I want to combine into a new function. The…
2
votes
2 answers

Instance member '....' cannot be used on type 'CustomTextField'; did you mean to use a value of this type instead?

I want to change the 'leftIcon' variable in the CustomTextField class from the ViewController. however, I get the following error in the CustomTextField class. CustomTextField class CustomTextField: UITextField, UITextFieldDelegate { //"person" …
Ufuk Köşker
  • 1,288
  • 8
  • 29
2
votes
1 answer

How can I learn Swift commands while creating through Storyboard?

I'm messing around with the storyboard builder and watching the viewcontroller as I do, so I can learn the code for each item. For example if I use storyboard to create a label I want to see the label code that is generated so I can document the…
2
votes
1 answer

Swift open new window programmatically in macOS

In Swift using macOS: By removing @NSApplicationMain (and making a subclass of NSWindowController) in AppDelegate I create the main window programmatically, without using storyboards, etc.: //@NSApplicationMain class AppDelegate: NSObject,…
2
votes
1 answer

programmatical screen touch with react-native

My goal is to program a game assistant - app that runs on the background and does the following: 1) takes screenshot programmatically https://aboutreact.com/take-screenshot-programmatically/ 2) analyzes some pixels of it 3) creates programmatical…
Joel
  • 73
  • 1
  • 6
2
votes
3 answers

Instance Member Cannot Be Used on Type when pushing UIViewController

I am programmatically setting up ViewControllers (no storyboard). I want to pass data to the next VC, and while I know how to do that with a segue and a storyboard, I can't figure out how to do it purely programmatically. I get the error "Instance…
Ben
  • 3,346
  • 6
  • 32
  • 51
2
votes
1 answer

SCNCamera made programmatically not in the correct position

I am trying to programmatically create a camera for my MainScene.scn file. I need to create the camera in code, as I am wanting to make a camera orbit node, and this is the only way I can think of. I also would like to keep using my scene file. This…
George
  • 25,988
  • 10
  • 79
  • 133
2
votes
0 answers

How to put custom style on dynamic created view

I have a problem with styling a dynamic created button in my android app. The way I'm doing it is to create the button from it's constructor: Button myButton = new Button(this, null, R.style.Frontpage_case); My problem is that the button layout…
DNRN
  • 2,397
  • 4
  • 30
  • 48
2
votes
2 answers

Scrollview won't show everything

I'm adding Views dinamically to a Scrollview (LinearLayout) and It won´t show everything. For example, if I add 10 Views (TextView and EditView) it'll show like 4 and if I add more, like 200, It'll reach 'til the 131 but I can see like the beginning…
Stef Silva
  • 35
  • 4
2
votes
3 answers

How can I create a button programmatically in C# window app?

In the Form1_Load method what code should I write to create a simple button? private void Form1_Load(object sender, System.EventArgs e) { } So that on Load the button would show.
2
votes
1 answer

Android - Setting constraints to newly added imageviews and textviews

I have a constraint layout view where I add circleimageviews and text views programmatically, However, when I do that, the UI is not affected at all, I cannot find the mistake and I would appreciate it if anyone would help me with that issue. I use…
2
votes
1 answer

Android programmatically created button onClick from class

I have an onClick switch method in MainActivity.java and the buttons are programmatically created in Navigation.java. The initial menu nav.mainMenu() gets called correctly and the button is created as expected. My issue is that when I click the…
TomFirth
  • 2,334
  • 4
  • 20
  • 31
2
votes
1 answer

Android programmatic and XML constraints are different

I have already spent some time finding solution for this problem. In onCreate method of activity, I create two Buttons and set their constraints. But when done this in xml the same constraints look different. XML: XML constraints image
2
votes
1 answer

How to create ViewControllers without storyboard and set one as delegate of the other one?

Here is the first VC where I am setting delegate: class DiscoverVC: UIViewController, SetLocationDelegate { var name = "" let loc = LocationVC() override func viewDidLoad() { super.viewDidLoad() self.loc.delegate =…
2
votes
1 answer

programmatically embedding segmented control inside navigation bar

I am trying to insert a segmented control inside a navigation bar programmatically and am having some trouble loading the segmented controller in the nav bar. I am sure this very simple, but see code below. Thanks in advance! var…
user3708224
  • 1,229
  • 4
  • 19
  • 37