Lupo73 Posted March 25, 2009 Share Posted March 25, 2009 I need to display version numbers of some software in a listview, but if the version is a number like "1.0" or "2.0" the _GUICtrlListView_AddSubItem function add only "1" or "2" (it remove ".0", considering it as a number and not as a string). How can I fix it? SFTPEx, AutoCompleteInput, _DateTimeStandard(), _ImageWriteResize(), _GUIGraduallyHide(): some AutoIt functions. Lupo PenSuite: all-in-one and completely free selection of portable programs and games. DropIt: a personal assistant to automatically manage your files. ArcThemALL!: application to multi-archive your files and folders. Link to comment Share on other sites More sharing options...
SpookMeister Posted March 25, 2009 Share Posted March 25, 2009 (edited) look at String in the help file Edited March 25, 2009 by SpookMeister [u]Helpful tips:[/u]If you want better answers to your questions, take the time to reproduce your issue in a small "stand alone" example script whenever possible. Also, make sure you tell us 1) what you tried, 2) what you expected to happen, and 3) what happened instead.[u]Useful links:[/u]BrettF's update to LxP's "How to AutoIt" pdfValuater's Autoit 1-2-3 Download page for the latest versions of Autoit and SciTE[quote]<glyph> For example - if you came in here asking "how do I use a jackhammer" we might ask "why do you need to use a jackhammer"<glyph> If the answer to the latter question is "to knock my grandmother's head off to let out the evil spirits that gave her cancer", then maybe the problem is actually unrelated to jackhammers[/quote] Link to comment Share on other sites More sharing options...
Lupo73 Posted March 25, 2009 Author Share Posted March 25, 2009 (edited) I tried to add version in the following way, but it doesn't work: _GUICtrlListView_AddSubItem($hListView, $item, StringFormat("%s", $oVer), 1) and also String($oVer) doesn't work fine.. Edited March 25, 2009 by Lupo73 SFTPEx, AutoCompleteInput, _DateTimeStandard(), _ImageWriteResize(), _GUIGraduallyHide(): some AutoIt functions. Lupo PenSuite: all-in-one and completely free selection of portable programs and games. DropIt: a personal assistant to automatically manage your files. ArcThemALL!: application to multi-archive your files and folders. Link to comment Share on other sites More sharing options...
SpookMeister Posted March 25, 2009 Share Posted March 25, 2009 What did your original line of code for adding those listview items look like? [u]Helpful tips:[/u]If you want better answers to your questions, take the time to reproduce your issue in a small "stand alone" example script whenever possible. Also, make sure you tell us 1) what you tried, 2) what you expected to happen, and 3) what happened instead.[u]Useful links:[/u]BrettF's update to LxP's "How to AutoIt" pdfValuater's Autoit 1-2-3 Download page for the latest versions of Autoit and SciTE[quote]<glyph> For example - if you came in here asking "how do I use a jackhammer" we might ask "why do you need to use a jackhammer"<glyph> If the answer to the latter question is "to knock my grandmother's head off to let out the evil spirits that gave her cancer", then maybe the problem is actually unrelated to jackhammers[/quote] Link to comment Share on other sites More sharing options...
Lupo73 Posted March 25, 2009 Author Share Posted March 25, 2009 I add items in this way: $item = _GUICtrlListView_AddItem($hListView, $file, -1) _GUICtrlListView_AddSubItem($hListView, $item, $oVer, 1) _GUICtrlListView_AddSubItem($hListView, $item, " - ", 2) with $oVer that contains the software version SFTPEx, AutoCompleteInput, _DateTimeStandard(), _ImageWriteResize(), _GUIGraduallyHide(): some AutoIt functions. Lupo PenSuite: all-in-one and completely free selection of portable programs and games. DropIt: a personal assistant to automatically manage your files. ArcThemALL!: application to multi-archive your files and folders. Link to comment Share on other sites More sharing options...
SpookMeister Posted March 25, 2009 Share Posted March 25, 2009 Then it should be as simple as: _GUICtrlListView_AddSubItem($hListView, $item, String($oVer), 1) [u]Helpful tips:[/u]If you want better answers to your questions, take the time to reproduce your issue in a small "stand alone" example script whenever possible. Also, make sure you tell us 1) what you tried, 2) what you expected to happen, and 3) what happened instead.[u]Useful links:[/u]BrettF's update to LxP's "How to AutoIt" pdfValuater's Autoit 1-2-3 Download page for the latest versions of Autoit and SciTE[quote]<glyph> For example - if you came in here asking "how do I use a jackhammer" we might ask "why do you need to use a jackhammer"<glyph> If the answer to the latter question is "to knock my grandmother's head off to let out the evil spirits that gave her cancer", then maybe the problem is actually unrelated to jackhammers[/quote] Link to comment Share on other sites More sharing options...
Lupo73 Posted March 25, 2009 Author Share Posted March 25, 2009 I have found the problem: I had also another problem, so I have made some changes and I found that the bug is in _GUICtrlListView_SimpleSort function. Without running this function, but problems are solved. So now can you help me to substitute this function with another one? I need to order my listview items respect the first column items (and keep corresponding subitems).. how to do it? SFTPEx, AutoCompleteInput, _DateTimeStandard(), _ImageWriteResize(), _GUIGraduallyHide(): some AutoIt functions. Lupo PenSuite: all-in-one and completely free selection of portable programs and games. DropIt: a personal assistant to automatically manage your files. ArcThemALL!: application to multi-archive your files and folders. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now