This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to update Item text in a Form  RSS feed

 
Erwin Poeze
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I created a Form with a single Item and added two commands. The form is displayed using the setCurrent() method.
This all works.

My question is: How can I change the text of the Item in the form without having to create a completely new form?

I tried to use the set method of the Item using item number 0, but this only works once as the item is removed and
a new item with a new number is created. This results in a exception, which is logical.

Then I removed the current Item from the form with deleteAll() and appended a new Item to the form, but nothing happens.
The deleteAll() method does not seem to have any effect.

I think the second approach maybe the best, but I can be completely wrong. Can any comment on my approach?

Thanks,
Erwin
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!