Old 1st January 2013, 00:03   #81
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
There's an excellent tutorial in the nsDialogs readme: http://nsis.sourceforge.net/Docs/nsDialogs/Readme.html

You can use the NSIS Dialog Designer for generating the layout-specific code, then use that in your nsDialogs page functions. (Note: When using nsDialogs, make sure you use MUI2, not MUI.)
MSG is offline   Reply With Quote
Old 11th January 2013, 13:17   #82
nicorac
NSIS Dialog Designer Author
 
Join Date: Apr 2011
Posts: 69
Version 1.1.2 released

v.1.1.2 - 2013-01-11
New version is available here:
http://coolsoft.altervista.org/nsisdialogdesigner
nicorac is offline   Reply With Quote
Old 12th December 2013, 15:42   #83
shadowpoa
Member
 
Join Date: Jun 2011
Posts: 52
Little problem with CoordinateSystem

Hi,

I noticed that when inserting a DirRequest control two controls are created, like the text below, so far so good.

PHP Code:
  ; === DirRequest1_Txt (typeText) ===
  ${
NSD_CreateText26u 69u 110u 11u ""
  
Pop $hCtl_JANELA_DirRequest1_Txt
  
  
; === DirRequest1_Btn (typeButton) ===
  ${
NSD_CreateButton138u 68u 20u 14u "..."
  
Pop $hCtl_JANELA_DirRequest1_Btn 
But, when changing CoordinateSystem, it changes at left panel (Attachment) but not on the script itself.

I solved with changing the dialog's CoordinateSystem to PPPP with inherit at the control, but think not the best choice, could you take a look on this behavior?

Many thanks!
Attached Files
File Type: zip Capturar.zip (1.9 KB, 286 views)
shadowpoa is offline   Reply With Quote
Old 16th December 2013, 11:14   #84
nicorac
NSIS Dialog Designer Author
 
Join Date: Apr 2011
Posts: 69
Thumbs up New version released

Quote:
Originally Posted by shadowpoa View Post
could you take a look on this behavior?
I just released an updated version that fixes the bug you reported, both on DirRequest and on FileRequest controls.
code:
v.1.1.3 - 2013-12-16
FIX: Fixed generated script for DirRequest and FileRequest controls, not respecting CoordinateSystem.


Latest version can be found here: http://coolsoft.altervista.org/nsisdialogdesigner

Thanks for your feedback.
Claudio
nicorac is offline   Reply With Quote
Old 10th July 2014, 22:02   #85
shadowpoa
Member
 
Join Date: Jun 2011
Posts: 52
Talking Control Positioning problem

Hi, me again...

Just for start, I´d like to say that this is the best editor for NSDialogs available.

So lets to the problem.

I´ve playing with some dialogs, and have noticed that after set size to 1044 and placed some controls, hitting test compiling and then the compiled dialog pops, they're different!!

So, I done some testing, and saw that this behavior occurs when using DLU to size and place controls (default) .

I got some time reading... and found this link...
http://blogs.msdn.com/b/oldnewthing/.../17/74811.aspx

and this:
https://groups.google.com/forum/#!to...32/fT3gXGbwISc

So, I adapted the sample code from here http://nsis.sourceforge.net/Get_text_dimensions to convert pixels units to dlu and voilá, the size and positions are equal.

Hope you can fix it, if more tests needed please ask.
Attached Thumbnails
Click image for larger version

Name:	screen_coolsoft.gif
Views:	515
Size:	97.6 KB
ID:	51280  
shadowpoa is offline   Reply With Quote
Old 11th July 2014, 11:42   #86
nicorac
NSIS Dialog Designer Author
 
Join Date: Apr 2011
Posts: 69
Thumbs up Thanks for your feedback

Quote:
Originally Posted by shadowpoa View Post
...after set size to 1044 and placed some controls, hitting test compiling and then the compiled dialog pops, they're different
It turned out that the bug exists for all dialog sizes.
Since 1044 is bigger than the others, the bad behavior is much more evident here.

Thanks to your feedback (and the samples you provided) I found 2 bugs:
  1. DialogUnits were calculated using bad coefficients, because I was using the wrong font as reference.
  2. DialogUnits (and also Percentage) were emitted as integers (no decimals) to NSIS generated script; this adds another error to the one already present due to point 1)
Both the errors will be fixed into version 1.2.0, available in a few minutes (stay tuned ).

I also added a new feature: a new "All" subproperty into CoordinateSystem controls property, that allows user to change X,Y,Width,Height subproperties together in a shot.

Thanks again for your detailed feedback.

Cheers
nicorac is offline   Reply With Quote
Old 11th July 2014, 13:01   #87
nicorac
NSIS Dialog Designer Author
 
Join Date: Apr 2011
Posts: 69
New version 1.2.0 released

Quote:
Originally Posted by shadowpoa View Post
...after set size to 1044 and placed some controls, hitting test compiling and then the compiled dialog pops, they're different
I just released an updated version that fixes the bug you reported and adds some new features:

v.1.2.0 - 2014-07-11
  • NEW: CoordinateSystem conversions are now done with higher precision.
    (thanks to shadowpoa for feedback: http://forums.winamp.com/showpost.php?p=3001224)
  • NEW: Control sizes are now written with up to 2 decimals in NSIS generated script.
  • NEW: Added a new "All" subproperty to controls CoordinateSystem property;
    it can be used to change X,Y,Width,Height subproperties all together.
  • FIX: Wrong vertical CoordinateSystem conversion "Pixel --> DialogUnits".
Latest version can be found here: http://coolsoft.altervista.org/nsisdialogdesigner

Thanks for your feedback.
Claudio
nicorac is offline   Reply With Quote
Old 11th July 2014, 13:46   #88
shadowpoa
Member
 
Join Date: Jun 2011
Posts: 52
Talking

Wow! this was fast... testing here...
billion thanks
shadowpoa is offline   Reply With Quote
Old 11th July 2014, 13:51   #89
nicorac
NSIS Dialog Designer Author
 
Join Date: Apr 2011
Posts: 69
Quote:
Originally Posted by shadowpoa View Post
Wow! this was fast... testing here...
billion thanks
Your feedback was really detailed, making it easier to find and fix...
nicorac is offline   Reply With Quote
Old 24th July 2014, 03:29   #90
Collector9999
Junior Member
 
Join Date: Mar 2009
Posts: 40
Is the source available?
Collector9999 is offline   Reply With Quote
Old 24th July 2014, 13:33   #91
nicorac
NSIS Dialog Designer Author
 
Join Date: Apr 2011
Posts: 69
No, sorry.
Maybe in the future...
nicorac is offline   Reply With Quote
Old 24th July 2014, 20:59   #92
shadowpoa
Member
 
Join Date: Jun 2011
Posts: 52
Background dialog color selector problem

nothing huge, but when selecting transparent as background color of dialog, i get this error.

Error occours only with background dialog, controls are working fine.

Thanks!
Attached Thumbnails
Click image for larger version

Name:	transparent_background.JPG
Views:	247
Size:	21.0 KB
ID:	51303  
shadowpoa is offline   Reply With Quote
Old 25th July 2014, 07:54   #93
nicorac
NSIS Dialog Designer Author
 
Join Date: Apr 2011
Posts: 69
That's the default message show by the .NET Framework when BackColor property of a Form is set to Color.Transparent... being at design time, sadly, it seems like a runtime exception.

I'll intercept the change and show a more "reassuring" MessageBox...

You'll find the fix into next version.
Thanks for reporting it.
nicorac is offline   Reply With Quote
Old 30th July 2014, 15:59   #94
plaintext
Junior Member
 
Join Date: Apr 2009
Posts: 8
How to create icon?

According the Website, NSIS Dialog Designer should support icons. But I cannot find a way to create one.

Any hints?
plaintext is offline   Reply With Quote
Old 31st July 2014, 09:43   #95
nicorac
NSIS Dialog Designer Author
 
Join Date: Apr 2011
Posts: 69
I copied that list from nsdialog documentation.
NSISDialogDesigner doesn't have the Icon object but the more generic Bitmap.
Will update the webpage accordingly.

What are you trying to do?
Take a look here for a discussion on icon usage.
nicorac is offline   Reply With Quote
Old 4th August 2014, 12:02   #96
plaintext
Junior Member
 
Join Date: Apr 2009
Posts: 8
I came across the problem while rewriting an hand-crafted dialog containing a few icons, in order to use the dialog code generated by your tool. The existing solution works perfectly, everything seems to be correct.
code:
InitPluginsDir
SetOutPath $PLUGINSDIR
File ..\res\foo.ico
${NSD_CreateIcon} 70u 85u 20u 20u ""
Pop $R0
${NSD_SetIcon} $R0 "$PLUGINSDIR\foo.ico" $hIcon
# ...
${NSD_FreeIcon} $hIcon


I don't like the idea, creating the icons with ${NSD_CreateBitmap}. Even if it would be possible in some ways, it's simply not made for that purpose. The graphics are icon files (.ico), not bitmaps (.bmp).

So my temporary solution is not using the Designer for that dialog.
plaintext is offline   Reply With Quote
Old 4th August 2014, 13:21   #97
nicorac
NSIS Dialog Designer Author
 
Join Date: Apr 2011
Posts: 69
That's fine. I have a workaround that bmaybe it's useful to you:
all the controls available in NSISDialogDesigner have a property named ControlCustomScript.
Everything you add to that property is emitted into the generated script, so you could put your custom script in there.
Page also has HeaderCustomScript and FooterCustomScript: the content of these properties will be prepended/appended to the generated script.
nicorac is offline   Reply With Quote
Old 5th August 2014, 06:13   #98
plaintext
Junior Member
 
Join Date: Apr 2009
Posts: 8
I saw and I already tried using the ControlCustomScript property. Nice idea so far. But in my case, I'll loose all the comfort with creating and positioning the icon control.
plaintext is offline   Reply With Quote
Old 6th August 2014, 18:30   #99
shadowpoa
Member
 
Join Date: Jun 2011
Posts: 52
Quote:
Originally Posted by plaintext View Post
I saw and I already tried using the ControlCustomScript property. Nice idea so far. But in my case, I'll loose all the comfort with creating and positioning the icon control.
A fast solution, but not definitive one is to edit nsdialogs.nsh and check file extension when creating bitmap or icons... then you can add a icon or bitmap and the script will create the control accordingly
shadowpoa is offline   Reply With Quote
Old 6th August 2014, 19:05   #100
shadowpoa
Member
 
Join Date: Jun 2011
Posts: 52
Problem with visible=False

When trying to set visible to false for buttons nothing happens at all...

The script remains untouched.
shadowpoa is offline   Reply With Quote
Old 7th August 2014, 10:37   #101
nicorac
NSIS Dialog Designer Author
 
Join Date: Apr 2011
Posts: 69
After your message I double checked all of the controls in version 1.2.0 and found some inconsistency:
  • HLine and VLine have Enabled/Visible properties but they cannot be disabled/hide (will be removed in 1.2.1)
  • HLine and VLine have events properties, but they have no events (will be removed in 1.2.1)
  • DirRequest and FileRequest do not respect Enabled/Visible properties (will be fixed in 1.2.1)
So the ones having non working Enabled/Visible properties are DirRequest and FileRequest, but the Button seems ok on my side.

This is the script generated by version 1.2.0 for a default button:
code:
; === Button1 (type: Button) ===
${NSD_CreateButton} 47.39u 19.69u 78.99u 14.77u "Button1"
Pop $hCtl_Form1_Button1


and this is the script generated for the same button when Visible = False
code:
; === Button1 (type: Button) ===
${NSD_CreateButton} 47.39u 19.69u 78.99u 14.77u "Button1"
Pop $hCtl_Form1_Button1
ShowWindow $hCtl_Form1_Button1 ${SW_HIDE}



Could you please double check it on 1.2.0 before I'll release 1.2.1?
Otherwise please post a simple .nsddef file here (please remove all unrelated controls) and I'll have a look.
nicorac is offline   Reply With Quote
Old 8th August 2014, 15:32   #102
shadowpoa
Member
 
Join Date: Jun 2011
Posts: 52
Sorry, forgot to mention... it was a DirRequest

Other things im´s trying to use without luck..

Onclick and Onchange on DirRequest does nothing, cant change default function created by the script.
CustomControlScript seems to do nothing at all too.

Thanks!
shadowpoa is offline   Reply With Quote
Old 8th August 2014, 21:32   #103
shadowpoa
Member
 
Join Date: Jun 2011
Posts: 52
Another Thing

Sorry to multiple posting...

I've discovered that bring to front and send to back aren't actually working...

It's supposed to reorder the creation of controls on script, bottom (1) to top (highest),

But it's not functioning have to reorder manually, so can't directly refer nsdinc files using "!include" without removing control and creating it again.
shadowpoa is offline   Reply With Quote
Old 11th August 2014, 16:30   #104
nicorac
NSIS Dialog Designer Author
 
Join Date: Apr 2011
Posts: 69
I fixed the bugs you found, thanks.
Quote:
Originally Posted by shadowpoa View Post
I've discovered that bring to front and send to back aren't actually working...
It's supposed to reorder the creation of controls on script, bottom (1) to top (highest),
Dialog editor is the same as VisualStudio Form editor (maybe you already know it...) with a small difference: in NSISDialogDesigner controls are "scripted" out sorted by their TabIndex property.

Having a second look at this implementation I see it's not so user friendly.
Will think about a better one; meanwhile I'm listening for any suggestion.
Quote:
Originally Posted by shadowpoa View Post
But it's not functioning have to reorder manually, so can't directly refer nsdinc files using "!include" without removing control and creating it again.
Could you please elaborate this?
What you mean with "can't directly refer nsdinc files using !include"?
nicorac is offline   Reply With Quote
Old 11th August 2014, 19:00   #105
shadowpoa
Member
 
Join Date: Jun 2011
Posts: 52
explaining...

Quote:
Originally Posted by nicorac View Post

Could you please elaborate this?
What you mean with "can't directly refer nsdinc files using !include"?
For example...

PHP Code:
!include 'c:\nsis\DIALOG_EXTRACT_SETUP.nsdinc'
 
Page Custom fnc_NSDIALOGS_Create 
To show page created with your editor...

I'm doing like this so I can control the ''Show'' event and do other stuff before showing window... (just my way to use this)

But, when I edit manually the nsdinc file, and need to edit in editor again for some reason, the Z order of controls are changed (specially background images), and then I have to edit manually again...

Or, the other way... remove all images and add again, but if I have to add one more control I do have to remove all images then add them again to keep images att bottom Z order.

Hope now is clear
shadowpoa is offline   Reply With Quote
Old 11th August 2014, 23:06   #106
nicorac
NSIS Dialog Designer Author
 
Join Date: Apr 2011
Posts: 69
Ok, now it's clear.
I'm thinking about removing the useless TabIndex property or, at least, sync it with the z-order.

Meanwhile do not edit .nsdinc files directly but fix creation order using the TabIndex property of each control (i.e. set it to 0 for background bitmap and 1,2,3,... for other controls).
nicorac is offline   Reply With Quote
Old 12th August 2014, 17:53   #107
shadowpoa
Member
 
Join Date: Jun 2011
Posts: 52
Quote:
Originally Posted by nicorac View Post
I'm thinking about removing the useless TabIndex property or, at least, sync it with the z-order.
would be nice to sync with Tabindex, because we are used to organize like this...

Quote:
Originally Posted by nicorac View Post
Meanwhile do not edit .nsdinc files directly but fix creation order using the TabIndex property of each control (i.e. set it to 0 for background bitmap and 1,2,3,... for other controls).
I've edited the file because it was easier to move the lines to bottom instead of adding control again, I've didn't noticed that manually changing Tabindex does the reordering.

Many Thanks!
shadowpoa is offline   Reply With Quote
Old 12th August 2014, 18:00   #108
shadowpoa
Member
 
Join Date: Jun 2011
Posts: 52
didn't noticed that version 1.3 already published...
working like a charm... thanks!
shadowpoa is offline   Reply With Quote
Old 12th August 2014, 18:04   #109
nicorac
NSIS Dialog Designer Author
 
Join Date: Apr 2011
Posts: 69
Version 1.3.0 released

Version 1.3.0 was just released.

v.1.3.0 - 2014-08-12
  • NEW: TabIndex property of each control is now synchronized with control order into its parent child controls collection. Changing TabIndex (directly or through the "Set TabOrder..." menu command will also change the scripting order of the control into the generated NSIS script.
  • NEW: A warning is now emitted into .nsdinc file to warn the user about manually editing the file.
  • FIX: When dragging a control over another, the dragged control disappeared making it difficult to place two overlapping controls (think about a background bitmap).
  • FIX: Show a custom error message when setting Dialog BackColor property to Transparent.
  • FIX: Fixed properties exposed by HLine and VLine special controls.
  • FIX: Generated script for DirRequest/FileRequest controls is missing some properties (Enabled, Visible, onChange, onClick, Style, ExStyle, ControlCustomScript).
It can be downloaded here:
http://coolsoft.altervista.org/nsisdialogdesigner

Quote:
Originally Posted by shadowpoa View Post
didn't noticed that version 1.3 already published...
working like a charm... thanks!
You preceded my by a few seconds...
nicorac is offline   Reply With Quote
Old 12th August 2014, 18:12   #110
nicorac
NSIS Dialog Designer Author
 
Join Date: Apr 2011
Posts: 69
Lightbulb

Quote:
Originally Posted by shadowpoa View Post
I've didn't noticed that manually changing Tabindex does the reordering.
The quickest way to reorder controls is right-click on the dialog and click on "Set TabOrder..." command (or open Edit menu and click on the same item).

After that, the dialog will go into TabOrder set mode, so you can click on your controls starting from the one you want to set TabIndex=0 and then the others.

To exit TabOrder set mode, do the command again.
nicorac is offline   Reply With Quote
Old 14th August 2014, 07:55   #111
yzldni
Junior Member
 
Join Date: Mar 2014
Posts: 26
i have a problem , when i want to create a button and a bitmap, and the bitmap show on the button, why i can't do this, how can i do this.
yzldni is offline   Reply With Quote
Old 15th August 2014, 19:38   #112
shadowpoa
Member
 
Join Date: Jun 2011
Posts: 52
Quote:
Originally Posted by yzldni View Post
i have a problem , when i want to create a button and a bitmap, and the bitmap show on the button, why i can't do this, how can i do this.
you ''can'' use system plugin to do this, but, depending of what you are pretending to do it may be a little 'ugly'

little example:
PHP Code:
  System::Call 'user32::LoadImage(i 0, t "$PLUGINSDIR\image.bmp", i ${IMAGE_BITMAP}, i 0, i 0, i ${LR_LOADTRANSPARENT}|${LR_CREATEDIBSECTION}|${LR_LOADFROMFILE}) i.s'
  
Pop $6
  SendMessage $handleofbuttom 
${BM_SETIMAGE} ${IMAGE_BITMAP} $
but, I do recommend to use Skinned Buttom plugin.
have a look http://nsis.sourceforge.net/SkinnedButton_plug-in
shadowpoa is offline   Reply With Quote
Old 15th August 2014, 19:58   #113
shadowpoa
Member
 
Join Date: Jun 2011
Posts: 52
compile test problem

Tried to use FooterCustomScript and HeaderCustomScript and discovered a little problem..

Cant test it using the complile button at Dialog Designer, but the nsdinc file is created correctly...

It seems like a problem with the custom script on %temp%\NSISDialogDesigner..

the functions are created empty, and the header one gets below the footer one at the script.
shadowpoa is offline   Reply With Quote
Old 10th November 2014, 21:38   #114
nicorac
NSIS Dialog Designer Author
 
Join Date: Apr 2011
Posts: 69
Version 1.3.2 released

Version 1.3.2 was just released.

v.1.3.2 - 2014-11-10
  • FIX: Fixed DialogID and Size management, form Size is now readonly unless DialogID is set to a custom value.
v.1.3.1 - 2014-10-27
  • FIX: Can't set custom dialog size, it always revert back to default.
  • FIX: Style and ExStyle dialog properties were serialized even of not necessary.
  • FIX: Removed useless Visible and Enabled dialog properties.
It can be downloaded here:
http://coolsoft.altervista.org/nsisdialogdesigner
nicorac is offline   Reply With Quote
Old 2nd March 2015, 17:07   #115
shadowpoa
Member
 
Join Date: Jun 2011
Posts: 52
custom uninstall page

I was trying to create a custom uninstall page, but I cant name it with 'un.' prefix...

After an error of saying the name is not valid, the designer change the name lilke this.
PHP Code:
dialog create function
Function 
fnc_un.unwelcome_Create 
See attachments for a print of the error...
Attached Thumbnails
Click image for larger version

Name:	img.png
Views:	140
Size:	5.4 KB
ID:	51729  
shadowpoa is offline   Reply With Quote
Old 3rd March 2015, 07:23   #116
nicorac
NSIS Dialog Designer Author
 
Join Date: Apr 2011
Posts: 69
To create an uninstall dialog you just need to set the dialog "SetupType" property to "Uninstall".
After that all functions will be automatically prefixed with "un.".
nicorac is offline   Reply With Quote
Old 4th March 2015, 21:05   #117
shadowpoa
Member
 
Join Date: Jun 2011
Posts: 52
:d

many thanks!

Last edited by shadowpoa; 4th March 2015 at 21:05. Reason: typo
shadowpoa is offline   Reply With Quote
Old 6th March 2015, 14:09   #118
shadowpoa
Member
 
Join Date: Jun 2011
Posts: 52
Smile NsDialogs Script before create

Is it possible to add a option to create some script block before nsdialogs::create?

ControlCustomScript, CerateFunctionCustomScript, FooterCustomScript, HeaderCustomScript are processed outside the block or after the create, sometimes i'll just skip the page, and doesn't need the create to be processed..
shadowpoa is offline   Reply With Quote
Old 6th March 2015, 14:44   #119
nicorac
NSIS Dialog Designer Author
 
Join Date: Apr 2011
Posts: 69
Quote:
Originally Posted by shadowpoa View Post
...sometimes i'll just skip the page, and doesn't need the create to be processed..
Why you need to put "dialog creation yes/no logic" into NSISDialogDesigner generated script?
From your script you call fnc_XXX_Show or fnc_XXX_Create to create the dialog so, if you need to skip form creation, put an ${If} clause in your script...

Maybe I'm missing something, could you please describe a real-case scenario?
nicorac is offline   Reply With Quote
Old 6th March 2015, 16:25   #120
shadowpoa
Member
 
Join Date: Jun 2011
Posts: 52
I can... but

I can do this, but calling a "return" or "abort" for example, if I have an alternate function, I need to create a control to store the status and then do the return before the "create"...

The point is manage the code from the dialog in the dialog designer... not in hmnsisedit or something else....

With this, I could use the test to put a messagebox yes/no before the window and test it on coolsoft, and not on another IDE
shadowpoa is offline   Reply With Quote
Reply
Go Back   Winamp & SHOUTcast Forums > Developer Center > NSIS Discussion

Tags
designer, ide, nsdialogs

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump