Sign in Join

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

Mailing lists / lazarus / 1999-04

FW: Dynamic Caption Change

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

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

Cliff Baeseman

-----Original Message-----

Earlier message 77 lines
From: Cliff Baeseman Sent: Thursday, April 22, 1999 8:54 AM To: 'Shane Miller' Subject: Dynamic Caption Change Yep that is the same I was thinking but alot of these controls decend from gtklabel. It is quite apparent that the label is holding a local copy. In theory you should be able to cast a button widget as a gtklabel and then use gtk_label_set to change the caption of a button for instance. But I have tried just about every thing and cannot get it to work. Cliff -----Original Message----- From: Shane Miller Sent: Thursday, April 22, 1999 8:33 AM To: Subject: Re: RE: RE: RE: RE: [lazarus] Where is Classe.pp (lazarus) PChar's point to the address of a string so if something else (another variable) points to that address, or that address is the address of another variable, then when you change PChar's contents, the varialbe changes too. As long as PChar keeps the same address, you will see the change in the variable. Shane >>> Cliff Baeseman 04/21 3:54 PM >>> I was thinking about this the other night a little. GTK uses pchar or pointer to characters. If I change the PChar does the label change dynamically if the pchar changes? I have not tried it so I do not really know if it will or not. This would really clean things up a bit. Else I believe I would just create the group on the lower end much like I do with the menu system. Cliff -----Original Message----- From: Shane Miller Sent: Wednesday, April 21, 1999 3:32 PM To: Subject: Re: RE: RE: RE: [lazarus] Where is Classe.pp (lazarus) Problem: The RadioButton needs to access a "group" item so it knows what group it's in when it's created. However, the "group" property doesn't exist in TControl or TWinControl so either I have to create one (which is kind of a waste because nothing else uses it) or I have to actually create the component in the TRadioButton class. If I create the component in the TRadioGroup class, then how do I know when to destroy it and re-construct it when , for example, the caption changes? See if the caption changes, the radiobutton has to be recreated because gtk doesn't give you the ability to simply change the label for a radiobutton. You have to set the label when you create it. So, should I move "group" all the way down, or is there a way (?virtual function?) to notify a child class of a change caused by the parent .............Can TControl call something in TRadioButton.... Shane -- If I had something cute to say I forgot what it was -- _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject