Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7020735
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:21:26+00:00 2026-05-27T23:21:26+00:00

I have a Section that is set to RO and occurs in all InstType

  • 0

I have a Section that is set to RO and occurs in all InstTypes except for a special one.

When the user first selects the special InstType and then selects “Custom” as the InstType the section is unchecked and can’t be checked again in the “Custom” InstType.

So everything is fine except that when the users selects the “Custom” InstType the Section should always be checked again.

Only in the special InstType use case it should be unchecked.

How can I achieve this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T23:21:26+00:00Added an answer on May 27, 2026 at 11:21 pm

    You can enforce whatever logic you want in .onSelChange:

    !include WinMessages.nsh
    !include LogicLib.nsh
    !include Sections.nsh
    
    Page Components
    Page InstFiles
    
    InstType "Normal1"
    !define CIT_Special 1
    InstType "Special"
    InstType "Normal2"
    
    Section Foo
    SectionIn 1 2 3
    SectionEnd
    
    Section Bar SEC_Special
    SectionIn 1 3
    SectionIn RO
    SectionEnd
    
    Section Baz
    SectionIn 1 2 ;3 << Not the same as Foo just to have some sort of difference
    SectionEnd
    
    Function .onSelChange
    ;Normally you would call GetCurInstType here, but it seems we need a little hack to detect the custom section
    FindWindow $1 "#32770" "" $HWNDPARENT
    GetDlgItem $1 $1 0x3F9
    SendMessage $1 ${CB_GETCURSEL} 0 0 $2
    SendMessage $1 ${CB_GETITEMDATA} $2 0 $2
    ${If} $2 = ${CIT_Special}
        !insertmacro UnselectSection ${SEC_Special}
    ${Else}
        !insertmacro SelectSection ${SEC_Special}
    ${EndIf}
    FunctionEnd
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

within a form I have a section that allows the user to build out
I have a section of code that can be summarised as follows; void MyFunc()
I have a section of my application that allows for people to send an
I have 3 tables, - Section table that defines some general item sections. -
I have the following section of code in an app that I am writing:
I have extracted a MAC address into a char* array such that each section
I have a bash script that cuts out a section of a logfile between
I have a button that when pressed, a tableview section will be added and
I have 2 tables that I import to EF model. First table has a
I have set up a page to handle errors that occur in a website

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.