Seminko Posted June 10, 2014 Share Posted June 10, 2014 Hey fellas, I have an *.ini file with a few sections. Most of them I want ppl to be able to update through a GUI. But I want the default section to be read only. So if someone tries to update it and use the same name it does not let him. Obliged Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted June 10, 2014 Moderators Share Posted June 10, 2014 Seminko,Is this related to your last thread? If so, then all you need do is not add the "default" section name to the combo when loading the data - and check when adding a new section that the chosen name does not match. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
DatMCEyeBall Posted June 10, 2014 Share Posted June 10, 2014 Melba23; Seminko, He can use the $CBS_DROPDOWNLIST style, no need for unnecessary checks. "Just be fred, all we gotta do, just be fred." -Vocaliod "That is a Hadouken. A KAMEHAMEHA would have taken him 13 days and 54 episodes to form." - Roden Hoxha @tabhooked Clock made of cursors ♣ Desktop Widgets ♣ Water Simulation Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted June 10, 2014 Moderators Share Posted June 10, 2014 DatMCEyeBall,It depends how the user is asked to enter the new section name - if the edit control of the "section name" combo is used (as in the code I posted in the linked thread) then a check will indeed be required. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
DatMCEyeBall Posted June 10, 2014 Share Posted June 10, 2014 Melba23, User preferences and Seminko's too... I wonder what the Rube Goldberg solution would be. "Just be fred, all we gotta do, just be fred." -Vocaliod "That is a Hadouken. A KAMEHAMEHA would have taken him 13 days and 54 episodes to form." - Roden Hoxha @tabhooked Clock made of cursors ♣ Desktop Widgets ♣ Water Simulation Link to comment Share on other sites More sharing options...
Seminko Posted June 10, 2014 Author Share Posted June 10, 2014 Seminko, Is this related to your last thread? If so, then all you need do is not add the "default" section name to the combo when loading the data - and check when adding a new section that the chosen name does not match. M23 It is. Usually forums don't like multiple issues in the same thread. If it's ok here, alright then Omg, it is actually easy as there is just one default section so I can use sth like 'if read-section-you-want-to-add = "default section" then MsgBox' Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted June 10, 2014 Moderators Share Posted June 10, 2014 Seminko,If the new query is related to the previous one, by all means ask it in the existing thread - if it is unrelated then best to open a new one. And you have understood the check requirement perfectly. But do not forget to remove the default section from the list you load into the combo as well. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Seminko Posted June 10, 2014 Author Share Posted June 10, 2014 But do not forget to remove the default section from the list you load into the combo as well. M23 Why is that? I actually made the default parameter a variable. I set it up in a way that before anything is written to the ini file the script checks if the new section name corresponds to the default read-only section name and if it does a MsgBox will pop up and nothing will be written to the file itself. Thanks Melba Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted June 10, 2014 Moderators Share Posted June 10, 2014 Seminko, Why is that?Of course you do not have to remove the unmodifiable default section name from the combo list, but in my opinion it would be better not to have it appear in the list of those sections you can delete - why even offer the opportunity? M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area 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