Announcement

Collapse
No announcement yet.

Button Size

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Button Size

    Hi All,

    We are redesigning our setup dialogs, when we increase the control font size the buttons are not getting accordingly and the text is cut on the bottom side.

    How do I change button size?

    Thanks,

    Alberto

  • #2
    two ways:
    you could write a small dll (as primer file) to call; which would modify the visible window's button size. not easy, but doable.

    The easier way would be to use a custom screen, there you can define your own button sizes.

    Comment


    • #3
      Thanks jassing,

      How do I define a custom screen?

      Comment


      • #4
        RTFM...
        You go to screens, click on add, select custom, add buttons.

        Comment


        • #5
          This involves recreating all buttons logic, it would have been easier if I could have had the ability to change the existing buttons size.

          Thanks for your help.

          Alberto

          Comment


          • #6
            "Button Logic"??
            well; then I guess you'll need to look at the windows api and dynamically change the button size...
            Good luck...

            Comment


            • #7
              I will look for a more modern UI setup tool if SF won't provide anything in the short term. These setup screens look old even trying in all ways to modernize them. IndigoRose should give us 100% control on their appearance, without the need to rewrite all the logic.

              Comment


              • #8
                That's why there's so many out there to choose from. Personally, adding 1 line of code (SCreen.Next() or Screen.Back()) isn't a big deal when adding a custom button and certainly falls short of what I would consider "logic" -- but we all have our issues and what we consider logical.
                Nothing will give you 100% nothing.
                good luck...

                Comment


                • #9
                  I am talking about Prev/Next buttons of all screens. A quick review showed many lines of code I could easily mistake during the re-creation process.

                  The same is true for the progress bar border. It's black and cannot be changed. It should inherit standard system colors instead.

                  Code:
                  -- These actions are performed whenever progress is made while the setup is installing files.
                  
                  --[[
                  Note: 
                  	The file installation process is divided into 4 progress stages: 
                  
                  	1. preparing to install
                  	2. installing files
                  	3. creating the uninstall
                  	4. creating shortcuts
                  
                  	Each progress stage has a string in the project's language file(s)
                  	that describes the stage, e.g. "Installing Files..." This makes
                  	it possible for the progress text to be translated (along with
                  	the other localized strings in the language files).
                  ]]
                  
                  -- get the appropriate string ID for the current stage's progress message...
                  local strStringID;
                  if(e_Stage == INSTALL_STAGE_PREPARING) then
                  	strStringID = "MSG_PROG_PREPARING";
                  elseif(e_Stage == INSTALL_STAGE_INSTALLING_FILES) then
                  	strStringID = "MSG_PROG_INSTALLING_FILES";
                  elseif(e_Stage == INSTALL_STAGE_CREATING_UNINSTALL) then
                  	strStringID = "MSG_PROG_CREATING_UNINSTALL";
                  elseif(e_Stage == INSTALL_STAGE_CREATING_SHORTCUTS) then
                  	strStringID = "MSG_PROG_CREATING_SHORTCUTS";
                  end
                  
                  -- ...and get the corresponding string from the language file
                  local strStageMessage = SetupData.GetLocalizedString(strStringID);
                  
                  -- update the progress prompt to show the current stage
                  DlgStaticText.SetProperties(CTRL_STATICTEXT_LABEL_01, {Text=strStageMessage});
                  
                  -- if the current item is a file path, it might be too long to fit on the screen...
                  -- this next action will shorten the text to 72 characters if it contains at least one \ in it
                  local strAbbreviatedItemText = String.AbbreviateFilePath(e_CurrentItemText, 72);
                  
                  -- update the status text to show the current item (e.g. the file being installed)
                  DlgStaticText.SetProperties(CTRL_STATICTEXT_LABEL_02, {Text=strAbbreviatedItemText});
                  
                  -- update the progress bar
                  DlgProgressBar.SetPos(CTRL_PROGRESS_BAR_01, e_StagePct);

                  Code:
                  -- These actions are performed when the Next button is clicked.
                  
                  -- from _SUF70_Global_Functions.lua:
                  -- make sure the install folder path is formatted properly (i.e. is a valid UNC or DOS path string)
                  if(g_IsValidPath(strInstallFolderPath)) then
                  
                  	-- if there's enough space on the selected drive, proceed to the next screen
                  	if(_SpaceAvailable >= _SpaceRequired) then
                  		-- there's enough space on the drive...so
                  		-- proceed to the next screen
                  		Screen.Next();
                  	else
                  		-- there isn't enough space on the drive...
                  		
                  		-- from _SUF70_Global_Functions.lua:
                  		-- ask the user if they want to continue anyway
                  		if g_ConfirmFreeSpaceOverride() then
                  			-- user said to install anyway...so
                  			-- advance to the next screen
                  			Screen.Next();
                  		end
                  	end
                  else
                  	-- the install folder path isn't valid...
                  	
                  	local strTitle = SetupData.GetLocalizedString("MSG_INVALID_ENTRY");
                  	local strPrompt;
                  
                  	-- from _SUF70_Global_Functions.lua:
                  	-- check whether the install folder path contains only valid path characters
                  	if(g_ContainsValidPathChars(strInstallFolderPath)) then
                  		-- the string is just formatted wrong
                  		strPrompt = SetupData.GetLocalizedString("ERR_INVALID_PATH");
                  	else
                  		-- the string contains invalid characters
                  		strPrompt = SetupData.GetLocalizedString("ERR_INVALID_CHARACTERS") .. "\r\n/ * ? \" < > |";		
                  	end
                  
                  	-- tell the user to smarten up :)
                  	Dialog.Message(strTitle, strPrompt, MB_OK, MB_ICONEXCLAMATION);
                  end

                  Comment


                  • #10
                    You can always build your own UI in your favorite development environment, and run the installer created with Setup Factory silently, showing the progress in your own UI where you have full control over the appearance. In other words, you can gather the installation parameters in your own app, pass them to the installer (via command line arguments or INI file), have Setup Factory then create the folders and install the files, create the shortcuts and entry for the uninstaller, and still display the progress as you prefer, with 100% of control as you asked. However, there is no magic here, you need to work on this and build the UI. Sample code can be found here.

                    Ulrich

                    Comment


                    • #11
                      Only to change the progress bar border color and make buttons slightly bigger?

                      How much time can take to this tools manufacturer to add these two properties to theme designer?

                      Comment


                      • #12
                        Originally posted by devdept View Post
                        Only to change the progress bar border color and make buttons slightly bigger?

                        How much time can take to this tools manufacturer to add these two properties to theme designer?
                        I agree so much. There seems to be only elementary editing for a custom UI.

                        Comment

                        Working...
                        X