On Tuesday 22 December 2015 13:25:39 Fred van Stappen wrote:
> > Please show more code.
>
> Hello Martin.
>
> Maybe I use a obsolete way but it works perfectly.
> For example, for Ttabbar =>
>
>  if (Sender is Ttabbar) then
>    Result := 'tabbar, ' + Ttabbar(Sender).name + ', ' +
>    Ttabbar(Sender).tabs[ttabbar(Sender).activetag-1].caption
>
> Works like wanted ;-).
>
The question is why sender.getassistivecaption() produces a compile error for 
you.
 
> Here the complete code to get the name of a widget.
> Each assistive event has that code, for example =>
>
> procedure TSAK.clientmouseevent(const sender: iassistiveclient;
>                                            const info: mouseeventinfoty);
>   begin
>   if WhatName(Sender.getinstance) <> '' then
>   begin
> ...
>
Why don't you use
"
var
 mstr1: msestring;
...
 mstr1:= sender.getassistivecaption();
 if mstr1 = '' then begin
  mstr1:= sender.getassistivename();
 end;
"
Info about the widget category could be embedded into the result of 
iassistiveclient.getassistiveflags(). Are there no standards?

>
> But there is a mystery about tab...
>
> In MSEide, in sourceform it uses tab for each opened source. (vertical list
> of tab on right size of form).
>
> Sadly, at mousemove, it is not recognized as ttabpage nor ttab nor
> ttabwidget nor ttabbar with WhatName(sender) but as "Unknown" with the
> correct caption.
>
The tabs are an embedded tcustomtabbar without widgetstate ws_iswidget which 
does not get iassisttiveserver.clientmouseevent() currently, but 
doitementer() is sent.
git master a8e9a2545e88b69af73baf3d4f4e84f5aec5cef7 sends 
iassisttiveserver.clientmouseevent() for embedded widgets too.

> What widget is it ?
>
"tcustomtabbar".

> Is it possible to retrieve the class name of a component (or maybe there
> are no class-name for component in MSE). Or do you have a idea how to know
> what type of component is the sender ?
>
"tobject.classname()" returns the classname.

Martin

------------------------------------------------------------------------------
_______________________________________________
mseide-msegui-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

Reply via email to