User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Pascal and Delphi section within the Software Development category of DaniWeb, a massive community of 423,145 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,182 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Pascal and Delphi advertiser: Programming Forums
Views: 2704 | Replies: 7
Reply
Join Date: Dec 2006
Posts: 4
Reputation: i8Spooky is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
i8Spooky's Avatar
i8Spooky i8Spooky is offline Offline
Newbie Poster

Help code illiterate - add text from 5 TEdit to 1

  #1  
Dec 31st, 2006
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 6:54 pm. Reason: formatting
:: The only code I know is - Close; ::
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Mar 2006
Posts: 219
Reputation: Lord Soth is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 3
Lord Soth's Avatar
Lord Soth Lord Soth is offline Offline
Posting Whiz in Training

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

  #2  
Jan 2nd, 2007
Hi,

try this :
 edit6.text := edit1.text + edit2.text + edit3.text + edit4.text + edit5.text;
or even beter this :
 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
Crimson K. Software _________________________________________________________________ Crimson K. Blog
Reply With Quote  
Join Date: Dec 2006
Posts: 4
Reputation: i8Spooky is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
i8Spooky's Avatar
i8Spooky i8Spooky is offline Offline
Newbie Poster

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

  #3  
Jan 2nd, 2007
Originally Posted by Lord Soth View Post
Hi,

try this :
 edit6.text := edit1.text + edit2.text + edit3.text + edit4.text + edit5.text;
or even beter this :
 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.
:: The only code I know is - Close; ::
Reply With Quote  
Join Date: Mar 2006
Posts: 219
Reputation: Lord Soth is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 3
Lord Soth's Avatar
Lord Soth Lord Soth is offline Offline
Posting Whiz in Training

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

  #4  
Jan 3rd, 2007
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 1:06 pm.
Crimson K. Software _________________________________________________________________ Crimson K. Blog
Reply With Quote  
Join Date: Dec 2006
Posts: 4
Reputation: i8Spooky is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
i8Spooky's Avatar
i8Spooky i8Spooky is offline Offline
Newbie Poster

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

  #5  
Jan 3rd, 2007
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???

-----

unit forum1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, huwStrutils, StdCtrls;

type
  TMainForm = class(TForm)
    Label1: TLabel;
    Label2: TLabel;
    ebinput1: TEdit;
    ebinput2: TEdit;
    Button1add: TButton;
    codecombine: TEdit;
    Button2selectcopy: TButton;
    Button3clear: TButton;
    Button4exit: TButton;
    procedure Button1addClick(Sender: TObject);
    procedure Button2selectcopyClick(Sender: TObject);
    procedure Button3clearClick(Sender: TObject);
    procedure Button4exitClick(Sender: TObject);
 
    private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  MainForm: TMainForm;

implementation

{$R *.dfm}

procedure TMainForm.Button1addClick(Sender: TObject);

begin
      codecombine.text:= '(url=' + ebinput1.text + ')(b)' + ebinput2.text + '(/b)(/url)';
end;


procedure TMainForm.Button2selectcopyClick(Sender: TObject);
begin
      codecombine.SelectAll;
      codecombine.CopyToClipboard;
end;

procedure TMainForm.Button3clearClick(Sender: TObject);
begin
      codecombine.SelectAll;
      codecombine.Clear;
end;

procedure TMainForm.Button4exitClick(Sender: TObject);
begin
      Close;
end;

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 2:46 pm. Reason: Left a uses in code that I should have taken out - no harm caused
:: The only code I know is - Close; ::
Reply With Quote  
Join Date: Dec 2006
Posts: 10
Reputation: zabina is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
zabina zabina is offline Offline
Newbie Poster

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

  #6  
Jan 12th, 2007
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 2:35 am. Reason: Fake signature snipped
Reply With Quote  
Join Date: Dec 2006
Posts: 4
Reputation: i8Spooky is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
i8Spooky's Avatar
i8Spooky i8Spooky is offline Offline
Newbie Poster

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

  #7  
Jan 13th, 2007
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 4:43 pm.
:: The only code I know is - Close; ::
Reply With Quote  
Join Date: Aug 2006
Location: me::house
Posts: 908
Reputation: linux is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 23
linux's Avatar
linux linux is offline Offline
Posting Shark

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

  #8  
Mar 5th, 2007
I see every image up there fine in FF2... What's up with your firefox?
Toshiba M1151.49 GB DDR-2 RAM1.6 GHz Centrino Duo80GB HDDWindows XP Media Center Edition
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb Pascal and Delphi Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the Pascal and Delphi Forum

All times are GMT -4. The time now is 7:13 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC