Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[Delphi 7] Need basic coding help please. +rep and credits

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
NoManchesPuto
I post too much
Reputation: 0

Joined: 24 Jan 2009
Posts: 2820

PostPosted: Mon Apr 20, 2009 5:15 am    Post subject: [Delphi 7] Need basic coding help please. +rep and credits Reply with quote

I need a code/function that will send a selected item in a listbox to an edit so i can edit that code. Then i need a code that will send it back to the listbox from the edit. I will rep whoever can help me and will give them credit, also a basic function is ok i can edit it to fit. Thanks.
_________________
Back to top
View user's profile Send private message
Snootae
Grandmaster Cheater
Reputation: 0

Joined: 16 Dec 2006
Posts: 969
Location: --->

PostPosted: Mon Apr 20, 2009 6:59 am    Post subject: Reply with quote

be a bit more specific

its sounds like you want to take and item from an itemlist to an edit box


should be very easy

Code:
index   : Integer;


the selected item of the list

Code:
value   : String;


what the item contains

Code:
value := listBox.Items[index]


retrieve what the item contains

from there put the text into an edit box and add a button or something which will put the string back in place

Code:
edit1.text := value;


listBox.Items[index] := edit1.text;


havent done delphi for ages

_________________
Back to top
View user's profile Send private message
NINTENDO
Grandmaster Cheater Supreme
Reputation: 0

Joined: 02 Nov 2007
Posts: 1371

PostPosted: Mon Apr 20, 2009 7:56 am    Post subject: Reply with quote

Snootae, Is your code equal to mine?

Code:
private void uberGet()
{
  int index = listBox1.selectedIndex;
  textBox1.Text = listBox1[index].ToString();
}

private void uberSet()
{
  int index = listBox1.selectedIndex;
  listBox1[index].ToString() = textBox1.Text;
}

_________________
Intel over amd yes.
Back to top
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger
Snootae
Grandmaster Cheater
Reputation: 0

Joined: 16 Dec 2006
Posts: 969
Location: --->

PostPosted: Mon Apr 20, 2009 8:30 am    Post subject: Reply with quote

yeh pretty much, i was just trying to explain it to him cos he doesn't sound knowledgable, but that will probably help him cos im sceptical my code will work Very Happy
_________________
Back to top
View user's profile Send private message
NoManchesPuto
I post too much
Reputation: 0

Joined: 24 Jan 2009
Posts: 2820

PostPosted: Mon Apr 20, 2009 12:58 pm    Post subject: Reply with quote

Sorry, i am a bit new to coding in general, i am advancing quite well i might add, anyways the meaning of my post/thread was to ask for a code that will send 1 item(not a particular one) from a TListBox to a TEdit, i have found a code earlier today to send it back from the TEdit, it is as follows :
Code:
listBox1.Items.add(edit1.Text);
but i'm not sure as to how i would write one that would do the opposite Confused Confused Can you help me please Question

For a visual explanation, here is what i am trying to create, all of the buttons work except the "Send To Editor".

_________________
Back to top
View user's profile Send private message
Snootae
Grandmaster Cheater
Reputation: 0

Joined: 16 Dec 2006
Posts: 969
Location: --->

PostPosted: Mon Apr 20, 2009 10:08 pm    Post subject: Reply with quote

didnt even read all that stuff i said

and the exact code was posted

Code:
int index = listBox1.selectedIndex;
  textBox1.Text = listBox1[index].ToString();




Quote:
1 item(not a particular one)

what do you mean by that, you have to have a reason for using this item

_________________
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites