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 


How to use TabControl for Delphi?

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

Joined: 13 Jan 2007
Posts: 2000
Location: New Mexico

PostPosted: Sat Sep 08, 2007 6:36 pm    Post subject: How to use TabControl for Delphi? Reply with quote

It's me...... AGAIN.
I need to know how to use seperate buttons for the Tabs on TabControl like say if I wanted to show a picture when I click button1 but for the first tab only then a different picture when I click button2 but for the second tab, how would I be able to do that?
Back to top
View user's profile Send private message MSN Messenger
Symbol
I'm a spammer
Reputation: 0

Joined: 18 Apr 2007
Posts: 5094
Location: Israel.

PostPosted: Sun Sep 09, 2007 8:41 am    Post subject: Reply with quote

Sorry, my other account is mute from some reason...
I said (Skyance)

Code:
if TabControl1.TabIndex = 0 then begin //First tab is 0.
Image1.Visible := True;
Image2.Visible := False;
end;

if TabControl1.TabIndex = 1 then begin
Image1.Visible := False;
Image2.Visible := True;
end;


But if you use more tabs, like 4+ then use if else, like:
Code:
if TabControl1.TabIndex = 0 then begin
Image1.Visible := True
else
Image1.Visible := False;
Back to top
View user's profile Send private message
Never Again
I post too much
Reputation: 0

Joined: 13 Jan 2007
Posts: 2000
Location: New Mexico

PostPosted: Sun Sep 09, 2007 8:56 am    Post subject: Reply with quote

Oooh alright thx.
But what about setting it different, kind of like Kaspersky's Universal Flash trainer it has like 6 tabs how would you make buttons like that, setting the url to the 1st tab when you click Button1.
Back to top
View user's profile Send private message MSN Messenger
Symbol
I'm a spammer
Reputation: 0

Joined: 18 Apr 2007
Posts: 5094
Location: Israel.

PostPosted: Sun Sep 09, 2007 9:28 am    Post subject: Reply with quote

Code:
if TabControl1.TabIndex = 0 then
ShockwaveFlash1.LoadMovie(0, 'url for tab 1');

if TabControl1.TabIndex = 1 then
ShockwaveFlash1.LoadMovie(0, 'url2');

if TabControl1.TabIndex = 2 then
ShockwaveFlash1.LoadMovie(0, 'url3');

if TabControl1.TabIndex = 3 then
ShockwaveFlash1.LoadMovie(0, 'url4');
etc...
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