Board index » delphi » please help (TScrollbox and Tlabel)

please help (TScrollbox and Tlabel)

Thanks to all in advance for any help.

I have a program in which I need to place a Tlabel on an image at runtime.

I have a form with a toolbar and a scrollbox below the toolbar that has an
image component in/on it.

I have a rutine that creates a label at runtime with the OnMouseDown event
for the image.

alabel := Tlabel.create(self);
parent := self;
top := y;
left := x;  etc....
caption := 'text';

If I put the image in/on the scrollbox, I cannot see the label that I am
creating at runtime, but
if I do not use a scrollbox, the label show up with no problem.

The problem is, I need to use the scrollbox so that my toolbar does not
scroll up when the image in bigger than the client area of the form.

Please send any responses to br...@gtracks.com
Any help would be greatly appriciated.

Bryan

Is there any workaround for this problem.

 

Re:please help (TScrollbox and Tlabel)


Maybe make the form the parent?
Quote
Bryan Ray wrote in message <77v6f8$4d...@news.kornet.nm.kr>...
>Thanks to all in advance for any help.

>I have a program in which I need to place a Tlabel on an image at runtime.

>I have a form with a toolbar and a scrollbox below the toolbar that has an
>image component in/on it.

>I have a rutine that creates a label at runtime with the OnMouseDown event
>for the image.

>alabel := Tlabel.create(self);
>parent := self;
>top := y;
>left := x;  etc....
>caption := 'text';

>If I put the image in/on the scrollbox, I cannot see the label that I am
>creating at runtime, but
>if I do not use a scrollbox, the label show up with no problem.

>The problem is, I need to use the scrollbox so that my toolbar does not
>scroll up when the image in bigger than the client area of the form.

>Please send any responses to br...@gtracks.com
>Any help would be greatly appriciated.

>Bryan

>Is there any workaround for this problem.

Re:please help (TScrollbox and Tlabel)


Have you considered the z-order of the label ?

--
Scott Rice
SysWare Consulting
sr...@iquest.net

Quote
Gilles Baatsen wrote in message <780c43$cg...@koza.nl.net>...
>Maybe make the form the parent?

<<SNIP>>
>>alabel := Tlabel.create(self);
>>parent := self;
>>top := y;
>>left := x;  etc....
>>caption := 'text';

>>If I put the image in/on the scrollbox, I cannot see the label that I am
>>creating at runtime, but
>>if I do not use a scrollbox, the label show up with no problem.

>>The problem is, I need to use the scrollbox so that my toolbar does not
>>scroll up when the image in bigger than the client area of the form.

>>Please send any responses to br...@gtracks.com
>>Any help would be greatly appriciated.

>>Bryan

>>Is there any workaround for this problem.

Other Threads