No, sorry.
Maybe in the future...
NSIS Dialog Designer
156 posts
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!
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!
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.
I'll intercept the change and show a more "reassuring" MessageBox... 😉
You'll find the fix into next version.
Thanks for reporting it.
How to create icon?
According the Website, NSIS Dialog Designer should support icons. But I cannot find a way to create one.
Any hints?
According the Website, NSIS Dialog Designer should support icons. But I cannot find a way to create one.
Any hints?
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.
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.
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.
So my temporary solution is not using the Designer for that dialog.
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).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
So my temporary solution is not using the Designer for that dialog.
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.
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.
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 accordinglyOriginally Posted by plaintext View PostI 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.
Problem with visible=False
When trying to set visible to false for buttons nothing happens at all...
The script remains untouched.
When trying to set visible to false for buttons nothing happens at all...
The script remains untouched.
After your message I double checked all of the controls in version 1.2.0 and found some inconsistency:
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:
Otherwise please post a simple .nsddef file here (please remove all unrelated controls) and I'll have a look.
- 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:
and this is the script generated for the same button when Visible = False; === Button1 (type: Button) ===
${NSD_CreateButton} 47.39u 19.69u 78.99u 14.77u "Button1"
Pop $hCtl_Form1_Button1
Could you please double check it on 1.2.0 before I'll release 1.2.1?; === Button1 (type: Button) ===
${NSD_CreateButton} 47.39u 19.69u 78.99u 14.77u "Button1"
Pop $hCtl_Form1_Button1
ShowWindow $hCtl_Form1_Button1 ${SW_HIDE}
Otherwise please post a simple .nsddef file here (please remove all unrelated controls) and I'll have a look.
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!
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!
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.
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.
I fixed the bugs you found, thanks.
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.
What you mean with "can't directly refer nsdinc files using !include"?
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.Originally Posted by shadowpoa View PostI'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),
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.
Could you please elaborate this?Originally Posted by shadowpoa View PostBut it's not functioning 🙁 have to reorder manually, so can't directly refer nsdinc files using "!include" without removing control and creating it again.
What you mean with "can't directly refer nsdinc files using !include"?
explaining...
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 😉
For example...Originally Posted by nicorac View Post
Could you please elaborate this?
What you mean with "can't directly refer nsdinc files using !include"?
!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 😉
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).
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).
would be nice to sync with Tabindex, because we are used to organize like this...Originally Posted by nicorac View PostI'm thinking about removing the useless TabIndex property or, at least, sync it with the z-order.
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.Originally Posted by nicorac View PostMeanwhile 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).
Many Thanks!
didn't noticed that version 1.3 already published...
working like a charm... thanks!
working like a charm... thanks!
Version 1.3.0 released
Version 1.3.0 was just released.
v.1.3.0 - 2014-08-12
It can be downloaded here:
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:
You preceded my by a few seconds... 🙂Originally Posted by shadowpoa View Postdidn't noticed that version 1.3 already published...
working like a charm... thanks!
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).Originally Posted by shadowpoa View PostI've didn't noticed that manually changing Tabindex does the reordering.
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.
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'Originally Posted by yzldni View Posti 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.
little example:
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} $6 but, I do recommend to use Skinned Buttom plugin.have a look http://nsis.sourceforge.net/SkinnedButton_plug-in
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.
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.
Version 1.3.2 released
Version 1.3.2 was just released.
v.1.3.2 - 2014-11-10
v.1.3.1 - 2014-10-27
It can be downloaded here:
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:
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.
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.
; dialog create function
Function fnc_un.unwelcome_Create See attachments for a print of the error...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.".
After that all functions will be automatically prefixed with "un.".
:d
many thanks!
many thanks!
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..
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..
Why you need to put "dialog creation yes/no logic" into NSISDialogDesigner generated script?Originally Posted by shadowpoa View Post...sometimes i'll just skip the page, and doesn't need the create to be processed..
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?
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
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