BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Hybride: SpeedButton, Checkbox and Image

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> comp.lang.pascal.delphi.components.writing
View previous topic :: View next topic  
Author Message
Guest






PostPosted: Fri Aug 12, 2005 7:32 pm    Post subject: Hybride: SpeedButton, Checkbox and Image Reply with quote



Hello,

I try to make my control change state of other controls of the same
type when they have the same GroupIndex set...
All I get is Access Violation :(

could you please take a look at my code and tell me what is wrong?

Excerpt that makes problems:

________________________________________________________
procedure TxImage.Click;
var i, cc: integer;
begin
inherited;
if FGroupIndex <> 0 then
FChecked := True
else
FChecked := not FChecked;

if Assigned(PictureON) and Assigned(PictureOFF) Then
if FChecked then Picture.Bitmap := PictureON.Bitmap
else Picture.Bitmap := PictureOFF.Bitmap;

//THIS PART MAKES PROBLEMS Sad((((
if (FGroupIndex <> 0) and (Parent <> nil) and FChecked then
begin
cc := Parent.controlCount -1;
with Parent do
begin
for i := 0 to cc do
if Parent.Controls[i] is TxImage then
if TxImage(Parent.Controls[i]).FGroupIndex = FGroupIndex then
begin
TxImage(Parent.Controls[i]).Checked := False;
TxImage(Parent.Controls[i]).Invalidate;
end;
end;
end;
//THIS PART MAKES PROBLEMS Sad((((

invalidate;
end;
________________________________________________________

whole code here:
http://rafb.net/paste/results/qWkjL977.html

Thanks in advance!
~spleen
Back to top
Guest






PostPosted: Fri Aug 12, 2005 9:04 pm    Post subject: Re: Hybride: SpeedButton, Checkbox and Image Reply with quote



Spleenth said:

[...]
my friend has helped me, and here is the final version that works:
http://rafb.net/paste/results/LbtpCl48.html

you may use it and modify as you wish -.^

Cheers!
~spleen
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> comp.lang.pascal.delphi.components.writing All times are GMT
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.