On Tuesday 12 November 2013 14:50:42 Ivanko B wrote:
>
> --------------
> procedure twidget.enabledchanged;
> var
>  int1: integer;
>  bo1: boolean;
> begin
>  bo1:= isenabled; // = FALSE
>  if not bo1 then begin
>   if focused then begin
>    window.setfocusedwidget(nil); // <<<< HERE
>   end;
>  end;
>  if fframe <> nil then begin
>   if bo1 or not (frl_nodisable in fframe.flocalprops) then begin
>    fframe.setdisabled(not bo1);
>   end;
>  end;
>  for int1:= 0 to widgetcount - 1 do begin
>   widgets[int1].enabledchanged;
>  end;
>  statechanged;
> end;
> ----------------------
> Don't we have an wrong (to widget of same form) detection of form
> focus change here ?
>
It seems that you set enabled:= false of the widget which currently has input 
focus?
"
procedure twidget.setenabled(const Value: boolean);
begin
 if value <> getenabled then begin
  if value then begin
   include(fwidgetstate,ws_enabled);
  end
  else begin
   exclude(fwidgetstate,ws_enabled);
   if window.focusedwidget = self then begin
    nextfocus; <<<<<<<------
   end;
  end;
  if not (csloading in componentstate) then begin
   enabledchanged;
  end;
 end;
end;
"
nextfocus() does not find another focusable widget. Why?

Martin

------------------------------------------------------------------------------
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
_______________________________________________
mseide-msegui-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

Reply via email to