Because I haven't had time to apply any patches. Once I got some free time, I made the release to get back on schedule.
nsDialogs
173 posts
Ok, thanks for the explanation 🙂
Can you tell me is it possible to create link using nsdialogs?
Don't know why my code doeasnt work...
Regards,
-Pawel
Don't know why my code doeasnt work...
VAR Link
${NSD_CreateLink} 0 0 250 14 "http://www.winamp.com"
Pop $LINK
${NSD_OnClick} $LINK MyLink
SetCtlColors $LINK "0XFF0000" "${MUI_BGCOLOR}"
Function MyLink
ExecShell "open" "http://www.winamp.com"
FunctionEnd When i click the link nothing happens 🙁Regards,
-Pawel
AFAIK shell commands only work with an actual file.
What I've done before is create a URL shortcut in TEMP and then use the ExecShell open command on the shortcut instead of the URL.
Internet shortcuts are basically just INI files, so you can use WriteIniStr to create them like this:
What I've done before is create a URL shortcut in TEMP and then use the ExecShell open command on the shortcut instead of the URL.
Internet shortcuts are basically just INI files, so you can use WriteIniStr to create them like this:
(You could also use $PLUGINSDIR instead of $TEMP.)
WriteIniStr "$TEMP\ShortcutFile.url" "InternetShortcut" "URL" "http://www.winamp.com"
Originally posted by ComperioI am not sure I understand you well, but the main reason to use nsDialogs was eliminate writing to ini files. So, I don't want to use any ini files, I just want to run default browser by clicking the link on page created by nsdialogs...
AFAIK shell commands only work with an actual file.
What I've done before is create a URL shortcut in TEMP and then use the ExecShell open command on the shortcut instead of the URL.
Internet shortcuts are basically just INI files, so you can use WriteIniStr to create them like this:(You could also use $PLUGINSDIR instead of $TEMP.)
WriteIniStr "$TEMP\ShortcutFile.url" "InternetShortcut" "URL" "http://www.winamp.com"
Regards,
-Pawel
It worked for me, without any troubles. This is the code I use, which looks to be exactly the same as yours...
${NSD_CreateLInk} 364 33 80 16 "Privacy Policy"
Pop $DIGI.Registration.Link
${NSD_OnClick} $DIGI.Registration.Link onClickPrivacyLink
Function onClickPrivacyLink
Pop $0
ExecShell "open" "http://www.digi.com/privacy.jsp"
FunctionEnd
${NSD_CreateLInk} 364 33 80 16 "Privacy Policy"
Pop $DIGI.Registration.Link
${NSD_OnClick} $DIGI.Registration.Link onClickPrivacyLink
Function onClickPrivacyLink
Pop $0
ExecShell "open" "http://www.digi.com/privacy.jsp"
FunctionEnd
hmm... weird.
I'm was certain in a prior project, I was not able to make that work... 🙁
FWIW: I did find this article from Microsoft that explains how ShellExecute is supposed to work for launching URLs, and indeed, it seems it should have worked as PepeSoft first posted.
Sorry about the misleading post. 😳
When I get back to my work computer, I'll have to experiment with this more. Maybe there is something else at work here...
I'm was certain in a prior project, I was not able to make that work... 🙁
FWIW: I did find this article from Microsoft that explains how ShellExecute is supposed to work for launching URLs, and indeed, it seems it should have worked as PepeSoft first posted.
Sorry about the misleading post. 😳
When I get back to my work computer, I'll have to experiment with this more. Maybe there is something else at work here...
I can't make it fail this time. Sheik's code works correctly no matter what I do. Very strange. I probably wasn't totally awake the first time. (Or an update to NSIS fixed something.) Either way, it's working now. (I'm using NSIS 2.37 in case you're wondering.) And again, sorry for the confusion. 😳
Originally posted by ComperioThanks for help. Everything works ok for me now.
I can't make it fail this time. Sheik's code works correctly no matter what I do.
@Sheik
Thanks, your example works very good.
Ps: My example works very well too, but I had one label expanded on all page, so I couldn't click on link, because link was under this label 😛
Now, I have to wait for implementing "Hand" cursor over the lnk and color change on hower.
Regards,
-Pawel
Are multistate checkboxes now available with nsDialogs? Or rather something as simple as a checkbox with three states: unchecked, checked, and greyed?
I know for the Sections at least this is possible, but for custom dialog pages with nsDialogs I don't see anything pre-setup like the other nsDialog macros yet. I did note a few definitions for things like BS_3STATE and BS_AUTO3STATE, if those may have anything to do with it. However I'm not too well aware of the basics of the Styles and ExStyles sent to nsDialogs::CreateControl. Is there anything from msdn/etc I could read to figure out what to do to get this done? Or would it just be a monumental feat of work to make a 3-state checkbox?
Also I think this has been asked many times in NSIS past before, sorry if the answer is already there somewhere. Whether you call them 3-state or multi-state or intermediate states...not sure of the proper term.
I know for the Sections at least this is possible, but for custom dialog pages with nsDialogs I don't see anything pre-setup like the other nsDialog macros yet. I did note a few definitions for things like BS_3STATE and BS_AUTO3STATE, if those may have anything to do with it. However I'm not too well aware of the basics of the Styles and ExStyles sent to nsDialogs::CreateControl. Is there anything from msdn/etc I could read to figure out what to do to get this done? Or would it just be a monumental feat of work to make a 3-state checkbox?
Also I think this has been asked many times in NSIS past before, sorry if the answer is already there somewhere. Whether you call them 3-state or multi-state or intermediate states...not sure of the proper term.
Originally posted by PepeSoftGood deal! I am glad it worked for you.
Thanks for help. Everything works ok for me now.
@Sheik
Thanks, your example works very good.
Ps: My example works very well too, but I had one label expanded on all page, so I couldn't click on link, because link was under this label 😛
Now, I have to wait for implementing "Hand" cursor over the lnk and color change on hower.
Regards,
-Pawel
Its funny about not being able to click on the link because it was under a label... I also had that problem, so I have this comment before the code I posted:
/* We need to create our Link before the Privacy Text, as we need to be "on top" */
anyone figure out the code to make a transparent label so i can overlay it on a bmp ive tried the things mentioned earlier in this thread to no avail --thanks
For future referance if anyone needs to make a transparent label in Nsdialogs this example works ..
;--create some some label
${NSD_CreateLabel} 10 27 300 16 "Updates Complete."
Pop $HeaderLabelNoUpdates
CreateFont $1 "$(^Font)" "10" "700"
SendMessage $HeaderLabelNoUpdates ${WM_SETFONT} $1 0
SetCtlColors $HeaderLabelNoUpdates FFFFFF "transparent"
ShowWindow $HeaderLabelNoUpdates ${SW_HIDE}
ShowWindow $HeaderLabelNoUpdates ${SW_SHOW}
;--End of create some label
ZmAn3: Thanks for sharing
is there a way to set a controls extended style instead of the windows extended style for a control like if i send 0x00000020 which is LVS_EX_FULLROWSELECT it sets the windows style for the control instead so it sets WS_EX_TRANSPARENT thanks
you need to send a message to the listview to apply that style, check msdn
anyone know if and how i can create a child window in nsdialogs winspy shows the it as #32770 with ws_child ws_visible ws_vscroll ws_tabstop ds_setfont ds_3dlook and ds_control thanks
#32770 is the standard windows dialog class, so you would use CreateDialog or DialogBox with the system plugin...but, there is no way to actually implement the message proc needed so there would be no way to handle messages
Right aligned link control with nsDialogs ?
Hi folks,
I am trying to create a link control that is right aligned and so far I haven't been able to. Is this possible?
I've tried this:
Am I out of luck ?
Thanks!
Damien.
Hi folks,
I am trying to create a link control that is right aligned and so far I haven't been able to. Is this possible?
I've tried this:
But to no avail. I understand that if the link is an ownerdrawn custom control (not a static) then it should not accept SS_RIGHT, but even WS_EX_RIGHT does nothing.
${NSD_CreateLink} 0 176 100% 12u "Some Link"
Pop $MyLabel
${NSD_AddStyle} $MyLabel ${SS_RIGHT}
${NSD_AddExStyle} $MyLabel ${WS_EX_RIGHT}
Am I out of luck ?
Thanks!
Damien.
The relevant code only cares for the RTL setting of nsDialog itself and not for the applied control styles.
Sorry to be a pain but I don't think I fully understand the answer (sorry not a native english speaker here).
Is there a way to make a link control have it's text right aligned ?
Is there a way to make a link control have it's text right aligned ?
No, there's not currently a way to do that.
Thank you for the answer 🙂 I'll find a way around it.
Cheers,
D.
Cheers,
D.
alright, well underway to getting everything over to nsDialogs - doing a complete rewrite as I go as there's just too much that was relying on InstallOptions(Ex).
Here's two quick questions...
1. when might an 'error' occur when creating a dialog?
The examples all trap for the 'error' response out of 'nsDialogs::Create' and then call Abort (page gets skipped) - but I'm not seeing anything in the documentation as to what might cause an 'error' response to begin with.
2. I had a peek about and I think there was a thread where it was suggest to file a feature request for an onMouseover callback - has one been logged? If not, where might I log one?
( this would be nice to combine with the SetCursor plugin so that I can make it visually obvious when, for example, a bitmap control is clickable; might use the ToolTips plugin as an alternative of sorts? )
Here's two quick questions...
1. when might an 'error' occur when creating a dialog?
The examples all trap for the 'error' response out of 'nsDialogs::Create' and then call Abort (page gets skipped) - but I'm not seeing anything in the documentation as to what might cause an 'error' response to begin with.
2. I had a peek about and I think there was a thread where it was suggest to file a feature request for an onMouseover callback - has one been logged? If not, where might I log one?
( this would be nice to combine with the SetCursor plugin so that I can make it visually obvious when, for example, a bitmap control is clickable; might use the ToolTips plugin as an alternative of sorts? )
Currently, the only "error" would be failure to create the dialog which should never happen.
onMouseOver: https://sourceforge.net/tracker2/ind...49&atid=373088
onMouseOver: https://sourceforge.net/tracker2/ind...49&atid=373088
excellent - thanks, kichik; I'll keep the error check in and make a note to do some minor error log handling there 🙂
I want to create a custom page with a scrollable status message box, similar to the status (details) control in the standard installation page. Is this something that nsDialogs could do, or am I going against a wall? If nsdialogs could do it, would someone sketch it out for me, please? If it couldn't, would someone give me some alternative ideas based on other plugins?
I have looked at the nsis source code to see how the installation page does its thing, I see it's based on a listview control, but the code is way over my head...
The crucial point is that I should append text to the control synchronously, in a way to the text looks like a growing log and the user can scroll back.
---
If nsdialogs could handle controls on the installation page I would use the standard details control, but I read that nsdialogs controls don't work on standard pages, although that was one of the initial design considerations.
I have looked at the nsis source code to see how the installation page does its thing, I see it's based on a listview control, but the code is way over my head...
The crucial point is that I should append text to the control synchronously, in a way to the text looks like a growing log and the user can scroll back.
---
If nsdialogs could handle controls on the installation page I would use the standard details control, but I read that nsdialogs controls don't work on standard pages, although that was one of the initial design considerations.
whats wrong with a listbox? You need some code to set the width of the longest line (But it has already been done, I posted the code on the forum a while back) I also does not have the tooltip like the instfiles page has. It would also be possible to use a listview if thats what you really want, but it will require a bit of system plugin use to handle the LV_ITEM struct
Originally posted by AndersThanks. So I tried the Listbox and it seems good enough. What I'm missing is some way to export the text (like copy to clipboard in instfiles) and horizontal scrolling, which I don't think is possible, and that's maybe why instfiles does have the tooltip. I don't know the maximum length of a line in advance, why did you hint at setting the maximum line width?
whats wrong with a listbox? ... set the width of the longest line ... does not have the tooltip
you can get the scrollbar, http://forums.winamp.com/showthread....hreadid=300489
You could probably pull off the tooltip using my subclass plugin, but if you want a tooltip that bad, you are better off going with a listview and not the simpler listbox
When it comes to export, just having a button that does it is the easy way (I'm sure the wiki or forum has existing clipboard code sample) If you really really want ctrl+c or a context menu, you would have to subclass (My subclass plugin is very much in the alpha stage and you need to know win32 programming to use it)
You could probably pull off the tooltip using my subclass plugin, but if you want a tooltip that bad, you are better off going with a listview and not the simpler listbox
When it comes to export, just having a button that does it is the easy way (I'm sure the wiki or forum has existing clipboard code sample) If you really really want ctrl+c or a context menu, you would have to subclass (My subclass plugin is very much in the alpha stage and you need to know win32 programming to use it)