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
571
votes
34 answers

How do I create a basic UIButton programmatically?

How can I create a basic UIButton programmatically? For example in my view controller, when executing the viewDidLoad method, three UIButtons will be created dynamically and its layout or properties are set.
domlao
  • 15,663
  • 34
  • 95
  • 134
248
votes
27 answers

Is there a way to programmatically scroll a scroll view to a specific edit text?

I have a very long activity with a scrollview. It is a form with various fields that the user must fill in. I have a checkbox half way down my form, and when the user checks it I want to scroll to a specific part of the view. Is there any way to…
108
votes
10 answers

How do you add an action to a button programmatically in xcode

I know how to add an IBAction to a button by dragging from the interface builder, but I want to add the action programmatically to save time and to avoid switching back and forth constantly. The solution is probably really simple, but I just can't…
aggiesfan64
  • 1,133
  • 2
  • 7
  • 8
64
votes
3 answers

How can one work fully generically in data.table in R with column names in variables

What I'm looking for is a "best-practices-approved" alternative to the following workaround / workflow. Consider that I have a bunch of columns of similar data, and would like to perform a sequence of similar operations on these columns or sets of…
Philip
  • 7,253
  • 3
  • 23
  • 31
61
votes
11 answers

How to add Done button to the keyboard?

UPDATE: I also tried implementing UITextViewDelegate delegate and then doing in my controller: - (BOOL)textViewShouldEndEditing:(UITextView *)textView { [textView resignFirstResponder]; return YES; } I also set the delegate of the text view…
Richard Knop
  • 81,041
  • 149
  • 392
  • 552
58
votes
3 answers

Programmatic Access To Visual Basic Project Is Not Trusted

I have two scheduled tasks on my computer. They both open Excel files and run a macro & are pretty similar in what they do. They both work on my computer. However I moved the scheduled tasks onto a colleague's computer. One worked the other didn't.…
mHelpMe
  • 6,336
  • 24
  • 75
  • 150
34
votes
7 answers

UIScrollview with UIButtons - how to recreate springboard?

I'm trying to create a springboard-like interface within my app. I'm trying to use UIButtons added to a UIScrollView. The problem I'm running in to is with the buttons not passing any touches to the UIScrollView - if I try to flick/slide and happen…
Patrick
  • 637
  • 2
  • 8
  • 10
33
votes
1 answer

UIScrollView with pagination + showing part of the previous/following pages

I'm trying to create a kind of a "game mode" menu similar to the one used by the "Cut the Rope" game to select the level pack: What I want in particular is to achieve the same effect of showing the "current item" (in this case, the "2. Fabric Box"…
30
votes
2 answers

set UIButton's buttonType programmatically

I have a UIButton which I've added in IB, however the view behind this button changes color and I need to switch the button's type between InfoDark and InfoLight. Bizarrely though, buttonType property is read only. So how can i switch between light…
Jonathan.
  • 53,997
  • 54
  • 186
  • 290
28
votes
9 answers

Add a multiple buttons to a view programmatically, call the same method, determine which button it was

I want to programmatically add multiple UIButtons to a view - the number of buttons is unknown at compile time. I can make one or more UIButton's like so (in a loop, but shorted for simplicity): UIButton *button = [UIButton…
26
votes
7 answers

How to programmatically add text to a UIView

I have a UIView that I'd like to add several bits of text to. I have used a UITextView but I think that's overkill as it doesn't need to be editable. I thought about using a UILabel or a UITextField, but I don't see how you tell the superview…
Steve
  • 6,332
  • 11
  • 41
  • 53
20
votes
2 answers

Options for Programmatically Adding Certificates to Java KeyStore

I was getting an SSL Handshake Exception error: PKIX "path does not chain" (described here). I fixed it by importing a certificate chain using openssl: openssl s_client -host www.envmgr.com -port 443 -showcerts > cert_chain.crt and installed it into…
IcedDante
  • 6,145
  • 12
  • 57
  • 100
15
votes
3 answers

Android - custom button with shape drawables and a gradient programmatically

I want to make a custom button like this program does with perhaps a radial gradient. I subclassed view, and draw three shape drawables and then draw the text. the text seems off center, so I tried to draw a bounding rectangle for the text, but no…
Ray Tayek
  • 9,841
  • 8
  • 50
  • 90
14
votes
2 answers

Segue and Button programmatically swift

I am using iCarousel and I have to create my own button. I want to pass data from the button made programmatically to another view, but I don't have a segue identifier because I created the button programmatically. I don't know if it is possible to…
Juan Jose Rodrigo
  • 429
  • 2
  • 6
  • 14
14
votes
1 answer

Create MP4 video in JavaScript

Is it possible to create an MP4 video on a browser through JavaScript? (I know it is now possible in Flash with FlashyWrappers) Ideally, I will be feeding it with image frames (raw, PNG or anything) and it will be combining them into an MP4…
Bill Kotsias
  • 3,258
  • 6
  • 33
  • 60
1
2 3
29 30