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
10
votes
3 answers

Swift 3 Create UILabel programmatically and add NSLayoutConstraints

Hello I am trying to create a label programmatically and add NSLayoutConstraints so that it is centered in the superview regardless of screen size and orientation etc. I have looked but just can't find an example to follow. Here is what I have: let…
10
votes
2 answers

android - set ID to the view programmatically

I'm adding Buttons programmatically and the number of Buttons depends on some conditions. To add rules for RelativeLayout.LayoutParams that Buttons be aligned to the top of each other I need to set their IDs. All the answers from 2-3 years ago say…
Justin McGuire
  • 365
  • 1
  • 5
  • 18
10
votes
2 answers

Display UISearchController's searchbar programmatically

Note 1: This question pertains to adding a UISearchController's search bar outside of the table view it updates - NOT as the table view's header. Note 2: Some trial and error led me to a solution. Please see my answer below. I am new to iOS…
9
votes
2 answers

How to set text font as System Thin in Swift?

I want to set label text as System Thin. Read in StackOverflow and found an answer like this: labelDescriptionView.font = UIFont(name: "System-Thin", size: 15.0) but it did not work. How can I improve my code and make Thin font style…
Orkhan Alizade
  • 7,379
  • 14
  • 40
  • 79
9
votes
2 answers

Setting styles of programmatically added Views

In my code, I add input elements like radioButtons, checkboxes etc to my Layout programmatically. The problem is, that the style of those elements is not the default style that you would get, when you would add let's say a radioButton via xml. (It…
Cuddl3s
  • 163
  • 1
  • 12
8
votes
1 answer

Creating Sticker Pack programmatically, issue with casting UICollectionViewCell as MSStickerView

So, I have opted to using no storyboards in my messages extension sticker pack. The iMessage app comes with a storyboard file and a MessagesViewController.swift. I created 2 files named CollectionViewController and StickerCell. The idea is to…
8
votes
3 answers

UITextView added from code missing in UIStackView

I'm trying to add a UITextView to UIStackView programatically, but it doesn't appear on the screen. When I check in Debug View Hierarchy, it is in the view hierarchy and it has some constraints but doesn't show up in the outputted view. This is my…
dorsz
  • 905
  • 10
  • 20
8
votes
1 answer

Web API 2 Is it possible to load a route/controller programmatically?

I am currently working on an enterprise web application that uses WCF to implement a REST API. It utilizes a VirtualPathProvider to catch requests to *.svc files (which don't actually exist), and then builds them on the fly to dynamically load the…
7
votes
3 answers

create a UITableViewController programmatically in Swift

I'm trying to, as the title say, set up a UITableViewController programmatically. After a few hours of trying I hope someone can help me. And, yes, I hve checked out other posts on this matter: import UIKit class MainViewController:…
Nilzone-
  • 2,766
  • 6
  • 35
  • 71
6
votes
3 answers

How does one add UIButton to UIToolBar programmatically?

I have added the toolbar using Interface Builder, but I need to add the buttons at runtime / conditionally. I'm not getting any errors, but my dynamic buttons are not appearing on the toolbar. I have verified that arrayOfModulesScreens is loaded…
iamtoc
  • 1,569
  • 4
  • 17
  • 24
6
votes
4 answers

Exit Code 125 from Docker when Trying to Run Container Programmatically

I am trying to get an integration test working. In the test initialization phase I attempt to spin up a Redis server from a docker image. var p = new Process { StartInfo = new ProcessStartInfo("docker", "run --name redistest –p 6379:6379…
Kit
  • 20,354
  • 4
  • 60
  • 103
6
votes
1 answer

How to Open Android Soft Keyboard (Numeric) Programmatically ?

I know how to open a soft keyboard and even handle its key events. I need to open Numeric keyboard. P.S I am not using Edittexts in layout file. Here is the code I am using to open keyboard programmatically if (PasscodeLockUpdated.this !=…
6
votes
2 answers

Adding code to new excel sheet dynamically

I need some help Regarding VBA. In My code I add an excel sheet and rename it and add a validation list to it.I need to run some code on changing value in that validation list.And that must run only on change of that particular cell. If I am not…
krishna
  • 3,148
  • 5
  • 19
  • 24
6
votes
5 answers

How to Set individual background image for group of UIButtons by programmatically

Here is my piece of code that creates buttons programmatically: NSArray *buttonImage=[NSArray arrayWithObjects:[UIImage imageNamed:@"Cover_0.png"], [UIImage imageNamed:@"Cover_1.png"], [UIImage…
Vishnu
  • 2,243
  • 2
  • 21
  • 44
5
votes
2 answers

Set Windows 10 "Automatically show the touch keyboard" with WPF app

I need to programatically enable/disable the Automatically show the touch keyboard option in Windows 10 with a WPF (not a UWP) like is shown here. I couldn't find anything. Is there any API I can use from C# or registry key I can modify to…
Andres
  • 6,080
  • 13
  • 60
  • 110
1
2
3
29 30