Questions tagged [settext]

The concept of assigning text to a UI element

The concept of assigning text to a UI element.

Does not specifically refer to a programming language-specific or library-specific API but the general concept.

793 questions
0
votes
2 answers

Android options menu set a text

I have an option menu in Android. Now it has got 5 options. When I push one button ther comes up an toast, I push another and it starts an activity. That works all fine. Now I want to add another option. When I choose that option on the emulator I…
Simon
  • 2,328
  • 6
  • 26
  • 30
0
votes
1 answer

Filling some QTableWidgetItems with QString from file

I'm trying to fill a QTableWidget from a file that was exported by my program, but when I try to set text to the table cells they just ignore me, nothing happens. void MainWindow::on_actionOpen_Project_triggered() { QString line, fileName; …
Lucas C. Feijo
  • 1,002
  • 3
  • 13
  • 29
0
votes
4 answers

Setting TextView with string from string array chosen in a ListView in Android

Alright, a quick summary. The app opens with a listView (populated by a string array), when you tap one of the items in the list it takes you to another listView (populated by a string array) with items associated with the first item you tapped. In…
iamluisg
  • 82
  • 2
  • 10
0
votes
1 answer

Update "Log.i" in TextView with ScrollBar

I have in my layout.xml a TextView with "id = txtLog". Where do the test results from my application using: Log.i("Result:", "Value of x = " + x); for show result in LogCat. It is possible to show these results "Log.i" within the TextView? Note: I…
Vogatsu
  • 591
  • 1
  • 5
  • 8
0
votes
3 answers

Setting the value of an Android TextView when I click a button

In Java, if I want to set the value of a JLabel when I click a JButton, I can code it like this... JButton button = new JButton("add"); JButton label = new JLabel(); public void addListenersToButtons(){ button.addActionListener(this); } public…
user1338675
  • 61
  • 1
  • 3
  • 8
0
votes
2 answers

If statement only runs fully onresume()

I'm trying to setup a combat system that allows the user to pick between a melee attack and ranged attack (pick one of two radio buttons). Based on variables what actions the buttons can say, "out of range", "attack melee", "attack range", "reload…
maebe
  • 553
  • 1
  • 6
  • 18
0
votes
2 answers

Unable to setLabel text Xcode tableview

I am trying to set a label text with the text i selected from my tableview. Here are my codes - (void)viewDidLoad { // Location *l = [[Location alloc]init]; // [l view]; [super viewDidLoad]; // Do any additional setup after loading the…
Hexark
  • 413
  • 6
  • 22
0
votes
1 answer

JLabel will not change after button click

Basically, I want the text of 'lblIndividualScore' to change when the button 'btnCalculate' is clicked...but when i click it, the label doesn't change. I put a println right after it and I know that everything is being calculated correctly...it just…
Aerophite
  • 195
  • 2
  • 14
0
votes
1 answer

force close of aplication when passing more parameters for Async

I want to change my radio button text in android app with a value from the json object... the q_desc textView changes... but not the the text of the radio buttons...The application after changing the q_desc text view force closes....what is my…
sagar
  • 151
  • 2
  • 5
  • 14
-1
votes
2 answers

My setText isn't updating my JTextField?

So I'm missing something here, but I can't get my setAttributes method to update the agility text field like it's supposed to. The class that calls the method and the call works fine passing in the needed values as seen by the…
-1
votes
1 answer

Use getText() and setText() Method in one XML for Android

I'm trying to create an xml which gets me the text of the the editText field. Although it works but I am only getting the typed in text for only the last field. This is my code: TextView textOut; EditText getInput; TextView textOut1; EditText…
Student91
  • 59
  • 2
  • 9
-1
votes
1 answer

How to implement setText to integer dataType in Kotlin?

I want to set data from my editText which has integer typedata. if it is string, we can make setTake, but how we can implement it at integer? The warning is None of the following functions can be called with the arguments…
uul
  • 9
  • 5
-1
votes
3 answers

SetText in fragment from outside class

I have a fragment that displays data from APIs, but i dont want to be calling apis everytime the fragment is called.. so am making api call from a different class and and calling a method in the fragment to update UI (textViews) but am getting null…
-1
votes
2 answers

How can I change automatically a Label setter name in the program when it is running?

For example JLabel label0 = new JLabel(""); JLabel label1 = new JLabel(""); JLabel label2 = new JLabel(""); JLabel label3 = new JLabel(""); JLabel label4 = new JLabel(""); for (int i = 0;i<5;i++) { labeli.setText(i); } In this code, the…
copy14
  • 3
  • 3
-1
votes
2 answers

Android/Java changing TextViews text by inputting String id's HELP!

Well as the title states, anytime I try (in my java class) to settext of a TextView by directing it set the text of a string listed in "strings.xml" my program crashes, If i remove that call then the program runs fine. Below is an example. …
n0denine
  • 341
  • 2
  • 11