Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Foreign Languages > German Forum
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Text an einen bereits bestehenden Text "anhängen"

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-11-2008, 06:01 PM
Basic4ppc Veteran
 
Join Date: Jul 2008
Location: Schwäbisch Gmünd
Posts: 353
Unhappy Text an einen bereits bestehenden Text "anhängen"

Wieder eine Frage an die Profis:

Ich möchte in einer TextBox "Aufgaben" einen weiteren Text (welcher automatisch generiert wurde) anhängen.

Das Ergebnis soll also sein, daß der neu hinzukommende Text den bereits vorhandenen Text nicht ersetzt oder überschreibt, sondern sich an den vorhandenen Text "dranhängt".

Weiß jemand Rat?

DANKE schon mal im Voraus!
__________________
JOTHA | Greetz from the Schwabenländle.
Pocket-PC: HTC HD2 (Dual-Boot WindowsMobile 6.51 + Android 2.2 Froyo)
Reply With Quote
  #2 (permalink)  
Old 09-11-2008, 06:50 PM
specci48's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: Germany
Posts: 993
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

Meinst Du so etwas:

TextBox1.Text = TextBox1.Text & generierterText


Gruß
specci48
Reply With Quote
  #3 (permalink)  
Old 09-11-2008, 06:54 PM
Basic4ppc Veteran
 
Join Date: Jul 2008
Location: Schwäbisch Gmünd
Posts: 353
Default

Quote:
Originally Posted by specci48 View Post
Meinst Du so etwas:
TextBox1.Text = TextBox1.Text & generierterText
Gruß
specci48
... genau!

Ich müßte bloß wissen, wie das mit dem "generierten Text" geht.

Reicht da etwa nur das "&" dazwischen? Das wärs ja!

Ich probiere es gleich mal aus ... Danke!
__________________
JOTHA | Greetz from the Schwabenländle.
Pocket-PC: HTC HD2 (Dual-Boot WindowsMobile 6.51 + Android 2.2 Froyo)
Reply With Quote
  #4 (permalink)  
Old 09-11-2008, 09:05 PM
Basic4ppc Veteran
 
Join Date: Jul 2008
Location: Schwäbisch Gmünd
Posts: 353
Default Rückmeldung

Es funktioniert! (auch ohne das "&" - einfach Text anhängen)

Manchmal sieht man eben den Wald vor lauter Bäumen nicht ("war betriebsblind").

Danke nochmal für den Gedankenanstoß. Warum kompliziert, wenn es auch so einfach geht?
__________________
JOTHA | Greetz from the Schwabenländle.
Pocket-PC: HTC HD2 (Dual-Boot WindowsMobile 6.51 + Android 2.2 Froyo)
Reply With Quote
  #5 (permalink)  
Old 09-11-2008, 09:34 PM
specci48's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: Germany
Posts: 993
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

Quote:
Originally Posted by JOTHA View Post
(auch ohne das "&" - einfach Text anhängen)

Kurze Rückfrage:
Das &-Zeichen dient zur Verbindung zweier Zeichenketten. Wie kommst Du ohne aus???

Gruß
specci48
Reply With Quote
  #6 (permalink)  
Old 09-12-2008, 08:56 AM
Basic4ppc Veteran
 
Join Date: Jul 2008
Location: Schwäbisch Gmünd
Posts: 353
Default

Quote:
Originally Posted by specci48 View Post
Kurze Rückfrage:
Das &-Zeichen dient zur Verbindung zweier Zeichenketten. Wie kommst Du ohne aus???
Ich habe es einfach ausprobiert und es hat funktioniert:
Code:
Aufgaben.Text = ""&AufgabeDatum.Text&" "&Aufgaben.Text&""
... also mit der Aussage "ohne &" meinte ich, daß es ohne das "&" zwischen den Zeichenketten auch funktioniert.
__________________
JOTHA | Greetz from the Schwabenländle.
Pocket-PC: HTC HD2 (Dual-Boot WindowsMobile 6.51 + Android 2.2 Froyo)
Reply With Quote
  #7 (permalink)  
Old 09-12-2008, 01:41 PM
specci48's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: Germany
Posts: 993
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

Deine Variante mag funktionieren, ist aber nicht gerade lesbar.

Mein Vorschlag:
Wenn Du sicher gehen möchtest, dass Dein Code
a) leicht lesbar ist bzw. bleibt
und
b) auch in zukünftigen Basic4pp-Versionen ohne Probleme gültig ist
solltest Du besser eine etwas andere Schreibweise wählen:
Code:
Aufgaben.Text = AufgabeDatum.Text & " " & Aufgaben.Text

Gruß
specci48
Reply With Quote
  #8 (permalink)  
Old 09-12-2008, 02:08 PM
Basic4ppc Veteran
 
Join Date: Jul 2008
Location: Schwäbisch Gmünd
Posts: 353
Default

Quote:
Originally Posted by specci48 View Post
Code:
Aufgaben.Text = AufgabeDatum.Text & " " & Aufgaben.Text
... AHA ... man lernt nie aus!

Vielen Dank!

Ich versuche das beim nächsten Mal, wenn es wieder um das Thema geht.
__________________
JOTHA | Greetz from the Schwabenländle.
Pocket-PC: HTC HD2 (Dual-Boot WindowsMobile 6.51 + Android 2.2 Froyo)
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
"AddEvent" and "buttonUp/buttonDown" Byak@ Questions (Windows Mobile) 12 09-10-2008 04:04 PM
Is there any thing like Visual Basic "Tabbed dialog control" in Basic4ppc? mozaharul Questions (Windows Mobile) 6 03-23-2008 12:07 PM
Image Button kommt nicht wieder "hoch" troll German Forum 3 02-22-2008 10:03 AM
How do I use IF x.text="" OR y.text="" sunnyboyj Questions (Windows Mobile) 14 12-20-2007 02:12 PM
calling the device's "Programs" or "settings" screens HarleyM Questions (Windows Mobile) 0 12-05-2007 03:59 AM


All times are GMT. The time now is 05:01 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0