943,949 Members | Top Members by Rank

Ad:
Dec 31st, 2006
0

code illiterate - add text from 5 TEdit to 1

Expand Post »
Hello

I'm just a hobby Turbo Delphist. I'm sure this is one line of code simple to you, but I've tried everything :o and can't find it.

I want to add the text from 5 edit boxes [TEdit] to 1 edit box. Can you help me? Be an OnClick Button event.

It's just to make adding a url under name for a forum code.


[.u.r.l.=.   h.t.t.p.:/./.url.   .].[.b.].   U.R.L. t.e.x.t.   [./.b.].[./.u.r.l.]

The forum url code would be marked 'read only' ie. edit1 - edit3 - edit5 -- The 2 inputs are the URL and Name visible.

It's just to make it easier for me.

http://i16.tinypic.com/40mmmc5.jpghttp://i16.tinypic.com/40mmmc5.jpghttp://i14.tinypic.com/48fub8p.jpg

http://www.daniweb.com/techtalkforum....jpg%5B/IMG%5D
http://i14.tinypic.com/48fub8p.jpg
http://i16.tinypic.com/40mmmc5.jpg
Last edited by i8Spooky; Dec 31st, 2006 at 7:54 pm. Reason: formatting
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
i8Spooky is offline Offline
4 posts
since Dec 2006
Jan 2nd, 2007
0

Re: code illiterate - add text from 5 TEdit to 1

Hi,

try this :
Pascal and Delphi Syntax (Toggle Plain Text)
  1. edit6.text := edit1.text + edit2.text + edit3.text + edit4.text + edit5.text;
or even beter this :
Pascal and Delphi Syntax (Toggle Plain Text)
  1. edit6.text := '(url=' + edit2.text + '(b)' + edit4.text + '(/b)(/url)';

I used ( instead of square brackets on purpose because we use BB tag on the forum and it confuses it. On your code write them with square brackets.

Loren Soth
Reputation Points: 28
Solved Threads: 4
Posting Whiz in Training
Lord Soth is offline Offline
233 posts
since Mar 2006
Jan 2nd, 2007
0

Re: code illiterate - add text from 5 TEdit to 1

Click to Expand / Collapse  Quote originally posted by Lord Soth ...
Hi,

try this :
Pascal and Delphi Syntax (Toggle Plain Text)
  1. edit6.text := edit1.text + edit2.text + edit3.text + edit4.text + edit5.text;
or even beter this :
Pascal and Delphi Syntax (Toggle Plain Text)
  1. edit6.text := '(url=' + edit2.text + '(b)' + edit4.text + '(/b)(/url)';
I used ( instead of square brackets on purpose because we use BB tag on the forum and it confuses it. On your code write them with square brackets.

Loren Soth
*** THANKS LOREN you save my donkey. (Equus asinus)

I was trying similar, but nowhere near it, and could have gone on for ever. Like edit6.text := (edit1) + (edit2) + (edit3) + edit4) + (edit5);

And don't you hate it when Delphi says:- EXPECTED ':' but FOUND ';' So, you put in ':' and it stops and says expected ';'

I'm a bit (lot) rusty beginner. Did my projects from looping together code snippets on the Net some years ago. Usual midi player, wav player, text pad, rich text pad, save bookmarks, and on and on. Got some from PC Plus also.

Did this too -- shame on me....
procedure TMainForm.Button1addClick(Sender: TObject);
var
   ebinput1, ebinput2 : string;
begin

codecombine.text := '[.u.r.l.=' + 'ebinput1'  + '.[.b.].' +  'ebinput2' + '[/.u.r.l].';
end;
I searched every bookstore in Perth, WA and could not find a book on Delphi programming. Even the local agents didn't have an actual copy of Delphi 5, only an empty box.

Been using Delphi since about ver. 2, and what have we learned. Nick it off the Net, because someone has done it all before.

Will try it when I get off the Net, but it looks good, even more the second one, no need to show the other TEdits.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
i8Spooky is offline Offline
4 posts
since Dec 2006
Jan 3rd, 2007
0

Re: code illiterate - add text from 5 TEdit to 1

Hi,

One of the best resources on Delphi is the built-in help itself. It is more than a simple language reference.
http://www.crimsonksoft.com/delphihelp.GIF
Same is also valid for Visual Studio .Net

Loren Soth
Last edited by Lord Soth; Jan 3rd, 2007 at 2:06 pm.
Reputation Points: 28
Solved Threads: 4
Posting Whiz in Training
Lord Soth is offline Offline
233 posts
since Mar 2006
Jan 3rd, 2007
0

Re: code illiterate - add text from 5 TEdit to 1

Thanks again -- here is image of program. I'll put the link as well, in case it does not show up. And I think I'll try listing the code, although it may not turn out correctly displayed.


http://i13.tinypic.com/339kjg0.jpg
http://www.daniweb.com/techtalkforum....jpg%5B/img%5D

http://i13.tinypic.com/339kjg0.jpg

http://i13.tinypic.com/2rmthj6.jpg

{There may be a problem at TinyPic - cutting off bottom of image.}

{{NO -- I think it's Firefox 2, check in Internet Explorer 7, and image is OK. Such is life.}}
----


Have

Form > Miscellaneous
AlphBlend > set to True
AlphaBlendValue > set to 230 (Usually 255)

FormStyle > fsStayOnTop

Visual > BorderIcons > set to biMaximize False

*Change Button text to Bold > does not appear to work? >> nor colour?

I used to have Componet > dsFancyButton ?? also, that makes great looking buttons.

(Put a credit for (Lord) Loren Soth major help in the exe version info. Goes well with i8Spooky )

In days gone by used ASPack to compress my exe's. Reduces size by about 50%.

(This program is for a free forum I set up for BigPond ISP Aust. members.)

http://www.aokforums.com/bigbillabong/bigbillabong.html

It's a Powered by phpBB © 2001-2003 phpBB Group board.


** Interesting thing -- I took a screen capture with Irfanview, and it just captured behind the Form!
So, it was the invisable Form. Maybe capture can handle -- Alpha blend???

-----

Pascal and Delphi Syntax (Toggle Plain Text)
  1.  
  2. unit forum1;
  3.  
  4. interface
  5.  
  6. uses
  7. Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  8. Dialogs, huwStrutils, StdCtrls;
  9.  
  10. type
  11. TMainForm = class(TForm)
  12. Label1: TLabel;
  13. Label2: TLabel;
  14. ebinput1: TEdit;
  15. ebinput2: TEdit;
  16. Button1add: TButton;
  17. codecombine: TEdit;
  18. Button2selectcopy: TButton;
  19. Button3clear: TButton;
  20. Button4exit: TButton;
  21. procedure Button1addClick(Sender: TObject);
  22. procedure Button2selectcopyClick(Sender: TObject);
  23. procedure Button3clearClick(Sender: TObject);
  24. procedure Button4exitClick(Sender: TObject);
  25.  
  26. private
  27. { Private declarations }
  28. public
  29. { Public declarations }
  30. end;
  31.  
  32. var
  33. MainForm: TMainForm;
  34.  
  35. implementation
  36.  
  37. {$R *.dfm}
  38.  
  39. procedure TMainForm.Button1addClick(Sender: TObject);
  40.  
  41. begin
  42. codecombine.text:= '(url=' + ebinput1.text + ')(b)' + ebinput2.text + '(/b)(/url)';
  43. end;
  44.  
  45.  
  46. procedure TMainForm.Button2selectcopyClick(Sender: TObject);
  47. begin
  48. codecombine.SelectAll;
  49. codecombine.CopyToClipboard;
  50. end;
  51.  
  52. procedure TMainForm.Button3clearClick(Sender: TObject);
  53. begin
  54. codecombine.SelectAll;
  55. codecombine.Clear;
  56. end;
  57.  
  58. procedure TMainForm.Button4exitClick(Sender: TObject);
  59. begin
  60. Close;
  61. end;
  62.  
  63. end.
I changed the Forum Code from end brackets to () like you suggested.

Yes -- just found F1 Delphi help again.

*I couldn't get a scroll bar on the Edit3 (codecombine), but may not need.

---

XP crashed :evil: -- or FROZE while I was writing this -- had to reboot and drop my Net connection. Luckily Firefox 2 loaded all tabs again, and fortunately the message was still there!

---

Oh, oh, better recompile -- looks like I left 'huwStrutils' in.
Last edited by i8Spooky; Jan 3rd, 2007 at 3:46 pm. Reason: Left a uses in code that I should have taken out - no harm caused
Reputation Points: 10
Solved Threads: 0
Newbie Poster
i8Spooky is offline Offline
4 posts
since Dec 2006
Jan 12th, 2007
0

Re: code illiterate - add text from 5 TEdit to 1

Your contribution helps us keep the site free for our members and the advertising as unobtrusive as possible.
Last edited by cscgal; Jan 12th, 2007 at 3:35 am. Reason: Fake signature snipped
Reputation Points: 10
Solved Threads: 0
Newbie Poster
zabina is offline Offline
10 posts
since Dec 2006
Jan 13th, 2007
0

Re: code illiterate - add text from 5 TEdit to 1

Little program in Turbo Delphi.

It helps with quickly adding NAME on top of URL LINK. Also END TAGS to images -- without having to select the link in the 'post a topic' window.

Whacked it up on EZ-Files.net for downloading if you want it. Never used them before, so don't know how reliable they are.

download> Forum Code Linker

http://i11.tinypic.com/2w4flvk.jpghttp://i11.tinypic.com/2w4flvk.jpghttp://i11.tinypic.com/2w4flvk.jpghttp://www.daniweb.com/techtalkforum....jpg%5B/IMG%5D

It's for bigbillabong forums, but may work in other forums.


****EDIT :: IMPORTANT ;;; FOR MODERATER I'm using Firefox 2.01 and I tried to insert a picture of the program, but it keeps disappearing. Did a quick check in IE7 and there appears to be 3 pictures there. Cut them if you can. Apparently, my Firefox is NOT PERFECT! Does not show images on forum. Sorry for multi ones I see in IE7, but have to go now...
Last edited by i8Spooky; Jan 13th, 2007 at 5:43 pm.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
i8Spooky is offline Offline
4 posts
since Dec 2006
Mar 5th, 2007
0

Re: code illiterate - add text from 5 TEdit to 1

I see every image up there fine in FF2... What's up with your firefox?
Reputation Points: 118
Solved Threads: 30
Posting Shark
linux is offline Offline
931 posts
since Aug 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Pascal and Delphi Forum Timeline: Enter to tab
Next Thread in Pascal and Delphi Forum Timeline: Two strings will not combine





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC