Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 1999-04

Label mystery solved probably...

7 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Cliff Baeseman
to Shane Miller: I've tried it without using AddControl and it's failed. I have moved on for now so I…

If I can infact get past this label thing I might just be able to add a few myself. Speaking of which if I get it working how do you see TApplication doing a form creation. something like CreateForm(formclass: TForm) ? I can place a reference to the form in a list to track the instances and destroy when application.halt is called. As for the progress bar I will look at that I might have to create another control placement method using a vbox or alignment widget.

Cliff

Earlier message 61 lines
-----Original Message----- From: Shane Miller Sent: Friday, April 23, 1999 10:55 AM To: Subject: Re: RE: [lazarus] Label mystery solved probably... I've tried it without using AddControl and it's failed. I have moved on for now so I would appreciate it if anyone has time if they could look at the code. I am on another component for now. Shane >>> Cliff Baeseman 04/23 10:31 AM >>> Shane is the alignment widget classified as a container widget. AddControl will only work against a Container type widget at the moment. CLiff -----Original Message----- From: Shane Miller Sent: Friday, April 23, 1999 9:40 AM To: Cc: Subject: Re: [lazarus] Label mystery solved probably... Question: Can the gtk widget Statusbar be changed so it is automatically created inside an alignment widget? Like the toolbar there shoul be no instance where it's not either on the right/left/top/bottom/center of a form. If not, can someone look at the newest code in the CVS? I have created a TStatusBar class and I have the user create an alignment widget, then create a tstatusbar with the alignment as the parent. When I do this, the statusbar never shows up! It's hidden somewhere. If I create the Statusbar with the form as the parent (the code for that is in main.pp) then it displays itself but when the form is resized we would need to find some way of moving it to keep it on the bottom of the form. Any thoughts would be appreciated. Shane _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject

Reply by email

Cliff Baeseman
to Shane Miller: Question: Can the gtk widget Statusbar be changed so it is automatically created inside…

Shane is the alignment widget classified as a container widget. AddControl will only work against a
Container type widget at the moment.

CLiff

Earlier message 31 lines
-----Original Message----- From: Shane Miller Sent: Friday, April 23, 1999 9:40 AM To: Cc: Subject: Re: [lazarus] Label mystery solved probably... Question: Can the gtk widget Statusbar be changed so it is automatically created inside an alignment widget? Like the toolbar there shoul be no instance where it's not either on the right/left/top/bottom/center of a form. If not, can someone look at the newest code in the CVS? I have created a TStatusBar class and I have the user create an alignment widget, then create a tstatusbar with the alignment as the parent. When I do this, the statusbar never shows up! It's hidden somewhere. If I create the Statusbar with the form as the parent (the code for that is in main.pp) then it displays itself but when the form is resized we would need to find some way of moving it to keep it on the bottom of the form. Any thoughts would be appreciated. Shane _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject

Reply by email

Shane Miller

TApplication should have a Components list or something that keeps track of all components (classees) in the application. If it is a parent class, it goes into this list. Each parent class also contains a list of components that it owns in the TComponent class (I think). That's how everything is initially created.

Shane

>> Cliff Baeseman 04/23 11:13 AM >>>

If I can infact get past this label thing I might just be able to add a few myself. Speaking of which if I get it working how do you see TApplication doing a form creation. something like CreateForm(formclass: TForm) ? I can place a reference to the form in a list to track the instances and destroy when application.halt is called. As for the progress bar I will look at that I might have to create another control placement method using a vbox or alignment widget.

Cliff

Earlier message 65 lines
-----Original Message----- From: Shane Miller Sent: Friday, April 23, 1999 10:55 AM To: Subject: Re: RE: [lazarus] Label mystery solved probably... I've tried it without using AddControl and it's failed. I have moved on for now so I would appreciate it if anyone has time if they could look at the code. I am on another component for now. Shane >>> Cliff Baeseman 04/23 10:31 AM >>> Shane is the alignment widget classified as a container widget. AddControl will only work against a Container type widget at the moment. CLiff -----Original Message----- From: Shane Miller Sent: Friday, April 23, 1999 9:40 AM To: Cc: Subject: Re: [lazarus] Label mystery solved probably... Question: Can the gtk widget Statusbar be changed so it is automatically created inside an alignment widget? Like the toolbar there shoul be no instance where it's not either on the right/left/top/bottom/center of a form. If not, can someone look at the newest code in the CVS? I have created a TStatusBar class and I have the user create an alignment widget, then create a tstatusbar with the alignment as the parent. When I do this, the statusbar never shows up! It's hidden somewhere. If I create the Statusbar with the form as the parent (the code for that is in main.pp) then it displays itself but when the form is resized we would need to find some way of moving it to keep it on the bottom of the form. Any thoughts would be appreciated. Shane _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject

Reply by email

Shane Miller

I've tried it without using AddControl and it's failed.

I have moved on for now so I would appreciate it if anyone has time if they could look at the code. I am on another component for now.

Shane

>> Cliff Baeseman 04/23 10:31 AM >>>

Shane is the alignment widget classified as a container widget. AddControl will only work against a
Container type widget at the moment.

CLiff

Earlier message 35 lines
-----Original Message----- From: Shane Miller Sent: Friday, April 23, 1999 9:40 AM To: Cc: Subject: Re: [lazarus] Label mystery solved probably... Question: Can the gtk widget Statusbar be changed so it is automatically created inside an alignment widget? Like the toolbar there shoul be no instance where it's not either on the right/left/top/bottom/center of a form. If not, can someone look at the newest code in the CVS? I have created a TStatusBar class and I have the user create an alignment widget, then create a tstatusbar with the alignment as the parent. When I do this, the statusbar never shows up! It's hidden somewhere. If I create the Statusbar with the form as the parent (the code for that is in main.pp) then it displays itself but when the form is resized we would need to find some way of moving it to keep it on the bottom of the form. Any thoughts would be appreciated. Shane _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject

Reply by email

Cliff Baeseman
to Shane Miller: Question: Can the gtk widget Statusbar be changed so it is automatically created inside…

How about this idea. Create a TButton and give statusbar the button as a parent. This should allow you to
position the control using addcomponent.

Cliff

Earlier message 31 lines
-----Original Message----- From: Shane Miller Sent: Friday, April 23, 1999 9:40 AM To: Cc: Subject: Re: [lazarus] Label mystery solved probably... Question: Can the gtk widget Statusbar be changed so it is automatically created inside an alignment widget? Like the toolbar there shoul be no instance where it's not either on the right/left/top/bottom/center of a form. If not, can someone look at the newest code in the CVS? I have created a TStatusBar class and I have the user create an alignment widget, then create a tstatusbar with the alignment as the parent. When I do this, the statusbar never shows up! It's hidden somewhere. If I create the Statusbar with the form as the parent (the code for that is in main.pp) then it displays itself but when the form is resized we would need to find some way of moving it to keep it on the bottom of the form. Any thoughts would be appreciated. Shane _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject

Reply by email

Shane Miller

Question:

Can the gtk widget Statusbar be changed so it is automatically created inside an alignment widget? Like the toolbar there shoul be no instance where it's not either on the right/left/top/bottom/center of a form.

If not, can someone look at the newest code in the CVS? I have created a TStatusBar class and I have the user create an alignment widget, then create a tstatusbar with the alignment as the parent. When I do this, the statusbar never shows up! It's hidden somewhere.

If I create the Statusbar with the form as the parent (the code for that is in main.pp) then it displays itself but when the form is resized we would need to find some way of moving it to keep it on the bottom of the form.

Any thoughts would be appreciated.

Shane

Reply by email

Shane Miller

Here's the code for changing the TLabelButton's label dynamically without creating and re-creating the label or button.

First things first....

Button2 : TLabelButton;
implementation
procedure something;
begin
Button2 := TLabelButton.Create(AOwner);
Button2.Left := 1;
Button2.Top := 70;
Button2.Height := 30;
Button2.Width := 75;
Button2.Caption := 'OLD CAPTION';
Button2.Show;
//Now the caption of the button is "OLD CAPTION".  I am going to change it...
with pgtkButton(Button2.fcomponent)^ do
gtk_label_set(pgtklabel(Child),'New Label');
//Now the label is "New Label"
// Button2.fcomponent is de-referneced so you can then access it's structure.
//It's structure contains a child pgtkwidget  which I assumed was the label.  Seems to work.  Try it!
Writeln('Shane is cool!');
//  Needs this line to work :-)
end;
end.

Reply by email