Autor Beitrag
ijcro
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 22



BeitragVerfasst: Mo 05.06.06 07:37 
Hello All!

Can anybody help me please?

I have a property, through them change type of other property (via simple property editor). And now I have to give information for Object Inspector, that other property (is TPersistent object, and is other type and is realocated) is changed. But I don't know how it do.

Please know anybody how to do? Thank you for your time

Regards

_________________
ijcro
alzaimar
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2889
Erhaltene Danke: 13

W2000, XP
D6E, BDS2006A, DevExpress
BeitragVerfasst: Mo 05.06.06 10:29 
Hi,

Sorry, but I can't replicate your problem. I wrote a component which gives various information about a given date and time (day of week, formatted date, day of year etc.) When I change e.g. the date, all other properties get updated by the object inspector. I assume the OI simply updates all properties.

I use D6 Enterprise.

_________________
Na denn, dann. Bis dann, denn.
Arno Nym
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 131



BeitragVerfasst: Mo 05.06.06 10:29 
Hi,
I don't know exactly if i catched the Problem, but if you wish to change a property automatically, when another property has been changed you'll have to call setting-procedures. The following example shows how it works in a standart TControl descendant. If you change "Show hint" to "true" the property "parentshowhint" will alter.
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
...
public
 property ShowHint: Boolean read FShowHint write SetShowHint stored IsShowHintStored;
...
...
...
procedure TControl.SetShowHint(Value: Boolean);
begin
  if FShowHint <> Value then
  begin
    FShowHint := Value;
    FParentShowHint := False; // <--
    Perform(CM_SHOWHINTCHANGED, 0, 0);
  end;
end;
...


with kind regards, Arno Nym

Moderiert von user profile iconChristian S.: Code- durch Delphi-Tags ersetzt
ijcro Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 22



BeitragVerfasst: Mo 05.06.06 12:41 
Well, I have identic solution. Setter change other property, but this property is object. Previous instance is free and new allocated. But Object Inspector don't know the change and no refresh it - when is expanded object property, it contain randomize characters or numbers, no default data for new instance. I think, that I have to use any similar construct via Perform() for Object Inspector message.

_________________
ijcro
ijcro Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 22



BeitragVerfasst: Di 06.06.06 13:53 
I think that solution can be Refrest or Collapse of objects in Object Inspector, but I don't know how call it (problem is when subproperty is expanded and it is changed in instance - it produce error in IDE).

_________________
ijcro