Source language: Translate to:

hpwtreeview

Questions about NeoBook PlugIns

Moderator: Neosoft Support

Re: hpwtreeview

Postby HPW » Mon Jun 03, 2013 12:37 pm

Here they are:

http://www.hpwsoft.de/anmeldung/html1/n ... View32.jpg
http://www.hpwsoft.de/anmeldung/html1/n ... de1_32.jpg
http://www.hpwsoft.de/anmeldung/html1/n ... de2_32.jpg

>I making the graphic files with microsoft paint. Could it be that it's not making the files as it should?

I do not know. Can you open them in neobook or irfan view? Are they in correct size?

Regards
Hans-Peter
User avatar
HPW
 
Posts: 2510
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Re: hpwtreeview

Postby mishem » Tue Jul 02, 2013 1:40 pm

And again about the variables. :)

hpwTreeViewAddNode
Image

hpwTreeViewDelNode
Image

How to understand that empty TreeView?
mishem
 
Posts: 574
Joined: Mon Oct 08, 2012 1:51 pm

Re: hpwtreeview

Postby HPW » Wed Jul 03, 2013 3:11 am

Ok, I think it is a bug that DelNode does not update the variables.
Have to check.
Hans-Peter
User avatar
HPW
 
Posts: 2510
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Re: hpwtreeview

Postby HPW » Wed Jul 03, 2013 1:22 pm

Just released hpwTreeView 1.47:

http://www.hpwsoft.de/anmeldung/html1/n ... book3.html

Variables from OnChange are now reset in AddNode and DelNode

Instance-variables with [rectanglename_varname] are reset on hpwTreeViewDelete

I do not see it as a real bug anymore, the variable are intended to be used in the OnChange Action and there they are valid.
They are not real-time updated in any other command.
So I simply reset them now in AddNode and DelNode actions.
And when you remove the treeview all instance-variables are cleared.
Hans-Peter
User avatar
HPW
 
Posts: 2510
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Re: hpwtreeview

Postby mishem » Wed Jul 03, 2013 2:00 pm

Excellent. Thank you.
I will continue to torment him. :)
mishem
 
Posts: 574
Joined: Mon Oct 08, 2012 1:51 pm

Re: hpwtreeview

Postby mishem » Fri Jul 05, 2013 1:01 am

Greetings.
Now this is a mouse event.
If clicking on the nodes, then everything is fine.
If clicking on the plus sign, the event does not occur. But the value of the variable changes.
mishem
 
Posts: 574
Joined: Mon Oct 08, 2012 1:51 pm

Re: hpwtreeview

Postby HPW » Fri Jul 05, 2013 6:45 am

But the value of the variable changes.


Which value of which variable?

Expanding or collapsing is not the same as a node-click.
RTreeView3_Expanded_Node and RTreeView3_Collapsed_Node are set and [RTreeView3_OnExpandedAction] and [RTreeView3_OnCollapsedAction] are fired.

Regards
Hans-Peter
User avatar
HPW
 
Posts: 2510
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Re: hpwtreeview

Postby mishem » Fri Jul 05, 2013 8:09 am

Which value of which variable?

Code: Select all
....._Text
....._AbsIndex
....._Index
....._Level
....._ImgIndex
....._SelIndex....._ParentText
....._ParentAbsIndex
....._ParentIndex
....._ParentLevel
....._ParentImgIndex
....._ParentSelIndex


I am repelled by them.

It's hard to explain .... :(
Look in the Explorer.

Or I'm done with the help of another plugin.
So you can do in hpwTreeView
Download

Use only the left or only the right mouse button.
The main thing. Changing the content when we switch nodes.


RTreeView3_Expanded_Node and RTreeView3_Collapsed_Node are set and [RTreeView3_OnExpandedAction] and [RTreeView3_OnCollapsedAction] are fired.

This I have not tried.
mishem
 
Posts: 574
Joined: Mon Oct 08, 2012 1:51 pm

Re: hpwtreeview

Postby Calli » Thu Jan 23, 2014 1:50 pm

Hello

There is a problem with scrollbars. In logic, they must "stick" to the object edges.
Image
And after minimize / maximize such defects appear.
Image

I apologize for my English (Google Translate)


Original in Russian wrote:Здравствуйте.
Имеется проблема со скроллбарами. По-логике, они должны "прилипать" к краям объекта.

А после минимизирования/максимизирования появляются такие дефекты.


P.S. Why disabled spoiler?
Xenia
User avatar
Calli
 
Posts: 1
Joined: Wed Jan 22, 2014 10:41 am
Location: Russia

Re: hpwtreeview

Postby HPW » Fri Jan 24, 2014 10:52 am

Hello,

I see this behaviour also, but I have no idea what cause this.
I have set the delphi treeview to Align=alClient.
Then delphi should do the rest.

Regards
Hans-Peter
User avatar
HPW
 
Posts: 2510
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Re: hpwtreeview

Postby dec » Sat Jan 25, 2014 5:48 am

Hello,

Hans, do you use the "WM_NOTIFYPLUGINOBJECT" message in your "rectangle object"?
.
Enhance your NeoBook applications!
.
57 plugins, 1113 actions and 230 samples
.
NeoPlugins website: www.neoplugins.com
.
User avatar
dec
 
Posts: 1663
Joined: Wed Nov 16, 2005 12:48 am
Location: Spain

Re: hpwtreeview

Postby HPW » Sat Jan 25, 2014 6:40 am

WM_NOTIFYPLUGINOBJECT


Yes I do, I use it the same way as other graphical plugins.
But the treeview behave somewhat strange.
Maybe my D7 is the problem.

Regards
Hans-Peter
User avatar
HPW
 
Posts: 2510
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Re: hpwtreeview

Postby dec » Sat Jan 25, 2014 6:54 am

Hello,

Yes; I also lie with this kind of problems, mainly in my npList plugin, which implement a "TComboBoxEx" component. I supose in your "WMPluginNotification" implementation you take care when the "msg.lParam" is "4", which mean that the rectangle host size are modified. Normally I use some functions to retrieve the rectangle host width and height in order to update the hosted component.

Take a look at my "TNeoZoom" object used in my npZoom plugin:

Code: Select all
unit UNeoZoom;

interface

uses
  Messages, Classes, Contnrs, JvZoom, UConstants;

type
  TNeoZoom = class( TJvZoom )
  private
    FRectangle : string;
  private
    procedure DoUpdatePosition();
  protected
    procedure WMPluginNotification( var msg: TMessage ); message WM_NOTIFYPLUGINOBJECT;
  public
    procedure UpdatePosition();
  public
    constructor Create( rectangle: string ); reintroduce;
  end;

implementation

uses
  Windows, Controls, UUtilities, UZoomModules;

{ TNeoZoom }

constructor TNeoZoom.Create( rectangle: string );
begin
  inherited Create( nil );
  FRectangle := rectangle;
end;

procedure TNeoZoom.UpdatePosition();
begin
  DoUpdatePosition();
end;

procedure TNeoZoom.DoUpdatePosition();
begin
  Self.Width := GetRectangleWidth( FRectangle );
  Self.Height := GetRectangleHeight( FRectangle );
end;

procedure TNeoZoom.WMPluginNotification(var msg: TMessage);
begin
  case msg.lParam of
    1:; // Publication page out
    2:; // Publication page in
    3:  // Publication runtime out
    begin
      ZoomModules.RemoveAll();
    end;
    4: // Rectangle host change the size
    begin
      DoUpdatePosition();
    end;
    5: // Paint control onto DC - used by PrintPage command
    begin
      if (msg.wParam <> 0) then begin
        Self.PaintTo(msg.wParam, 0, 0);
      end;
    end;
    6: // Component need tabstop? (1 = no, 0 = yes)
    begin
      msg.Result := PLUGIN_CONTROL_NOT_NEED_TAB_STOP;
    end;
    7: // Rectangle host is disable
    begin
      Self.Enabled := false;
    end;
    8: // Rectangle host is enable
    begin
      Self.Enabled := true;
    end;
  end;
end;

end.


And bellow you can view my "TNeoList" used by my npList plugin:

Code: Select all
unit UNeoList;

interface

uses
  Messages, Classes, Contnrs, UNeoListForm, UConstants;

type
  TNeoList = class( TNeoListForm )
  private
    FRectangle : string;
  private
    procedure DoUpdatePosition();
  protected
    procedure WMPluginNotification( var msg: TMessage ); message WM_NOTIFYPLUGINOBJECT;
  public
    procedure UpdatePosition();
  public
    constructor Create( rectangle: string ); reintroduce;
  end;

implementation

uses
  Windows, Controls, UUtilities, UListModules, DIALOGS;

{ TNeoList }

constructor TNeoList.Create( rectangle: string );
begin
  inherited Create( nil );
  FRectangle := rectangle;
end;

procedure TNeoList.UpdatePosition();
begin
  DoUpdatePosition();
end;

{
  Usually here we use a code like this:

  Self.Width := GetRectangleWidth( FRectangle );
  Self.Height := GetRectangleHeight( FRectangle );
  Self.Combo.Width := Self.Width;
  Self.Combo.Height := Self.Height;

  However, with this control in particular the above code don't work
  like we expected. Considerer the bellow workaround like that we use
  long time ago, following the NeoBook SDK, but taking care about
  the "resize problem", take a look at this NS forum thread:

  http://www.neosoftware.com/forum/viewtopic.php?t=19357

}
procedure TNeoList.DoUpdatePosition();
var
  r: TRect;
  imgOffset : integer;
begin
  Windows.GetClientRect( Self.ParentWindow, r );

  SetWindowPos
  (
    Self.Handle,
    0,
    0,
    0,
    ( r.Right - r.Left ),
    ( r.Bottom - r.Top ),
    SWP_SHOWWINDOW
  );

  imgOffset := 20;
  if Self.Combo.Font.Size > imgOffset then
    imgOffset := Self.Combo.Font.Size;

  SetWindowPos
  (
    Self.Combo.Handle,
    0,
    0,
    0,
    ( r.Right - r.Left ),
    ( r.Bottom - r.Top - imgOffset ),
    SWP_SHOWWINDOW
  );
end;

procedure TNeoList.WMPluginNotification(var msg: TMessage);
begin
  case msg.lParam of
    1:; // Publication page out
    2:; // Publication page in
    3:  // Publication runtime out
    begin
      ListModules.RemoveAll();
    end;
    4: // Rectangle host change the size
    begin
      DoUpdatePosition();
    end;
    5: // Paint control onto DC - used by PrintPage command
    begin
      if (msg.wParam <> 0) then begin
        Self.PaintTo(msg.wParam, 0, 0);
      end;
    end;
    6: // Component need tabstop? (1 = no, 0 = yes)
    begin
      msg.Result := PLUGIN_CONTROL_NEED_TAB_STOP;
    end;
    7: // Rectangle host is disable
    begin
      Self.Enabled := false;
    end;
    8: // Rectangle host is enable
    begin
      Self.Enabled := true;
    end;
  end;
end;

end.


As I say before normally the code that work is the used in the "NeoZoom" object "UpdatePosition" method. But other times we need to do something more like in the above "NeoList" object. Other think you can see above is that the "NeoZoom" object derive from the appropiate component directly, but, "NeoList" derive from a form (TForm), which itself contain the appropiate component. This is something that also occur in other of my plugins: some visual objects works well if you put directly into the rectangle host, others works if you put the component into a form, which finally is hosted in a NeoBook rectangle.

Well. Maybe this can offer to you some ideas. If you need more information and details about any part of the above code just tell me.
.
Enhance your NeoBook applications!
.
57 plugins, 1113 actions and 230 samples
.
NeoPlugins website: www.neoplugins.com
.
User avatar
dec
 
Posts: 1663
Joined: Wed Nov 16, 2005 12:48 am
Location: Spain

Re: hpwtreeview

Postby mishem » Fri Apr 08, 2016 1:45 pm

Hello Hans Peter

hpwTreeViewInsNode

If you insert more elements, only the first element of the two images used index.
It follows elemntov active and not active state applies only index is not active state.

hpwTreeViewSetVar
The list of variables is not a variable hpwTreeViewImageMaskColor.
mishem
 
Posts: 574
Joined: Mon Oct 08, 2012 1:51 pm

Re: hpwtreeview

Postby HPW » Sun Apr 10, 2016 5:44 am

Hello,

>hpwTreeViewInsNode

I do not understand the problem. Maybe the translation.
Not clear to me.

I will add hpwTreeViewImageMaskColor to hpwTreeViewSetVar.

Regards
Hans-Peter
User avatar
HPW
 
Posts: 2510
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

PreviousNext

Return to PlugIn Discussions

Who is online

Users browsing this forum: No registered users and 1 guest

cron