Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 10 of 12 total
Thread External JavaScript Components
Sat, Apr 25 2015 2:54 PMPermanent Link

Doug B

Has anyone successfully created an EWB external interface to a third-party set of JavaScript components?

Among other things, I'm looking for a menu component to use in my application.

I have some deadlines I need to meet that require some UI elements like menus and graphs.

Thanks,
Doug
Mon, Apr 27 2015 4:22 AMPermanent Link

Matthew Jones

Doug B wrote:

> Has anyone successfully created an EWB external interface to a
> third-party set of JavaScript components?
>
> Among other things, I'm looking for a menu component to use in my
> application.
>
> I have some deadlines I need to meet that require some UI elements
> like menus and graphs.

It is certainly possible to use third party javascript, but you'd
probably not want to use deep UI stuff as they will depend on other
framework operations, and EWB may conflict. But as I've posted
elsewhere, making a menu from panels is not hard - I was surprised at
how flexible and good looking you can make "assembled" components.

--

Matthew Jones
Tue, Apr 28 2015 2:09 PMPermanent Link

Doug B

Thanks, Matthew.  

I found the demo and modified it slightly for EWB2, however what I'm currently doing requires converting relative coordinates to absolute coordinates due to an additional level of nesting for my main menu.

Is there something like Delphi's ScreenToClient() and ClientToScreen() functions to convert back and forth from relative to 'absolute' screen coordinates?

>> But as I've posted elsewhere, making a menu from panels is not hard - I was surprised at
>> how flexible and good looking you can make "assembled" components.

To be honest, as flexible it is, my goal is to get my project done, not hack together my own simulated menu.

I'm not trying to be unreasonably critical, as I do appreciate all the work that has obviously gone into EWB2, but I would have expected a menu to be one of the most fundamental components included.  Hopefully one will show up in the near future.

Doug
Wed, Apr 29 2015 4:07 AMPermanent Link

Matthew Jones

Doug B wrote:

> Is there something like Delphi's ScreenToClient() and
> ClientToScreen() functions to convert back and forth from relative to
> 'absolute' screen coordinates?

Not sure if it is quite what you want, but I used this to modify mouse
coordinates.

procedure TfrmMine.ImageMouseMove(Sender: TObject; ShiftKey, CtrlKey,
AltKey: Boolean; X,Y: Integer);
var
   xObject : TControl;
   xParent : TControl;
begin
       if Sender is TControl then
       begin
           xObject := TControl(Sender);
           while xObject <> self do
           begin
               xParent := xObject.Parent;
               X := X + xObject.Left;
               Y := Y + xObject.Top;     
                      
               if (xObject is TPanel) then
               begin
                   Y := Y - TPanel(xObject).ScrollTop;
               end;
               xObject := xParent;
           end;
       end;


--

Matthew Jones
Wed, Apr 29 2015 12:54 PMPermanent Link

Doug B

I was planning on doing something similar, so thanks for posting the code.

Doug

"Matthew Jones" wrote:

Doug B wrote:

> Is there something like Delphi's ScreenToClient() and
> ClientToScreen() functions to convert back and forth from relative to
> 'absolute' screen coordinates?

Not sure if it is quite what you want, but I used this to modify mouse
coordinates.

procedure TfrmMine.ImageMouseMove(Sender: TObject; ShiftKey, CtrlKey,
AltKey: Boolean; X,Y: Integer);
var
   xObject : TControl;
   xParent : TControl;
begin
       if Sender is TControl then
       begin
           xObject := TControl(Sender);
           while xObject <> self do
           begin
               xParent := xObject.Parent;
               X := X + xObject.Left;
               Y := Y + xObject.Top;     
                      
               if (xObject is TPanel) then
               begin
                   Y := Y - TPanel(xObject).ScrollTop;
               end;
               xObject := xParent;
           end;
       end;


--

Matthew Jones
Thu, Apr 30 2015 3:49 AMPermanent Link

Matthew Jones

Doug B wrote:

>                     Y := Y - TPanel(xObject).ScrollTop;


That is probably the one to watch - in my case TPanel was the only
scrollable item, but others may do. Big effect obviously if scrolled.

--

Matthew Jones
Thu, Apr 30 2015 11:16 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Doug,

<< I'm not trying to be unreasonably critical, as I do appreciate all the
work that has obviously gone into EWB2, but I would have expected a menu to
be one of the most fundamental components included. >>

Yes, but it's not like we hide what controls/components are in the
product(s).  They're listed both on the product information page, and
several places in the manual, so it should not be surprising when a control
that we said was not in the product, was not actually in the product. Smile

<< Hopefully one will show up in the near future. >>

Yep, lots of good things coming this summer and onward.

Tim Young
Elevate Software
www.elevatesoft.com




Thu, Apr 30 2015 11:21 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Doug,

<< Is there something like Delphi's ScreenToClient() and ClientToScreen()
functions to convert back and forth from relative to 'absolute' screen
coordinates? >>

This is what you want:

http://www.elevatesoft.com/manual?action=viewprop&id=ewb1&comp=TControl&prop=LeftOrigin
http://www.elevatesoft.com/manual?action=viewprop&id=ewb1&comp=TControl&prop=TopOrigin

There's also these TControl methods, but they're protected and only
accessible to ancestor controls:

        function BodyToBaseX(Value: Integer): Integer;
        function BodyToBaseY(Value: Integer): Integer;
        function BaseToBodyX(Value: Integer): Integer;
        function BaseToBodyY(Value: Integer): Integer;

Tim Young
Elevate Software
www.elevatesoft.com
Thu, Apr 30 2015 9:18 PMPermanent Link

Doug B

>>
Yes, but it's not like we hide what controls/components are in the
product(s).  They're listed both on the product information page, and
several places in the manual, so it should not be surprising when a control
that we said was not in the product, was not actually in the product. Smile
<<

Yes, you were very clear about what components would and would not be included in the initial release, so I don't expect it, I was just a bit surprised a menu component wasn't one of them (which is why I prefaced my comment with not trying to be unreasonably critical). Wink

In any case, I do appreciate all of the work you have done and continue to do, along with the level of support you provide.

Perhaps in the future it would be helpful to have some sort of publicly visible (registered users only) voting system for 'wish list' components?  Although I'm sure you have a pretty good idea what those are based on customer requests...

Doug
Fri, May 1 2015 12:19 AMPermanent Link

Doug B

Thanks Tim, that's exactly what I needed. Smile

Doug

>>
This is what you want:

http://www.elevatesoft.com/manual?action=viewprop&id=ewb1&comp=TControl&prop=LeftOrigin
http://www.elevatesoft.com/manual?action=viewprop&id=ewb1&comp=TControl&prop=TopOrigin

There's also these TControl methods, but they're protected and only
accessible to ancestor controls:

        function BodyToBaseX(Value: Integer): Integer;
        function BodyToBaseY(Value: Integer): Integer;
        function BaseToBodyX(Value: Integer): Integer;
        function BaseToBodyY(Value: Integer): Integer;

Tim Young
Elevate Software
www.elevatesoft.com
<<
Page 1 of 2Next Page
Jump to Page:  1 2
Image