Jump to content

Recommended Posts

  • Moderators
Posted

CaptainGadget,

Thanks for that - I will release a new version soon.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

  • Moderators
Posted

[BUGFIX VERSION] 9 Aug 15

Fixed: Bug introduced in last update which crashed when run on XP - sorry about that.

New UDF and examples in first post.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

  • Jon unfeatured this topic
Posted

I had a problem with displaying a chunk of text:

$Whats2015 = _
        " Amendment history - 2015" & @CRLF & _
        "" & @CRLF & _
        " Version  | Date        | Author           | Details" & @CRLF & _
        " ---------+-------------+------------------+--------------------------------------------------------------------------------------------------------" & @CRLF & _
        "  1.0.265 | 12-Jan-2015 | Only Myself      | Minor improvement to add lots of wonderful features and all the bells and whistles I could think of now" & @CRLF & _
        "  1.0.266 | 13-Jan-2015 | Only Myself      | Minor amendment to correct all the bugs I inadvertently added in when adding the recent new features" & @CRLF & _
        "  1.0.267 | 15-Jan-2015 | Only Myself      | Minor improvement to the application to improve the responsiveness and performance in every way possible" & @CRLF & _
        "  1.0.268 | 21-Jan-2015 | Only Myself      | Minor amendment to stabilise the application which crashed and froze in every way possible after changes" & @CRLF & _
        "  1.0.269 | 28-Jan-2015 | Only Myself      | Minor improvement to take advantage of new features now available in the latest Windows beta OS" & @CRLF & _
        "  1.0.270 | 04-Feb-2015 | Only Myself      | Minor amendment to remove incompatibility stopping the App from running on all but the latest Windows beta OS" & @CRLF & _
        "  1.0.271 | 10-Mar-2015 | Only Myself      | Minor improvement to add an on-line help search menu with feature documentation and planned updates" & @CRLF & _
        "  1.0.272 | 03-Jun-2015 | Only Myself      | Minor amendment to update feature documentation links which were all misaligned to planned updates" & @CRLF & _
        "  1.0.273 | 15-Jun-2015 | Only Myself      | Minor improvement to overhaul the application to implement planned updates to all the main code modules" & @CRLF & _
        "  1.0.274 | 19-Jun-2015 | Only Myself      | Minor amendment to fix the system to work in a limited way while the main code modules are now non-operational" & @CRLF & _
        "  1.0.275 | 02-Jul-2015 | Only Myself      | Minor amendment to back out all the recent code changes from achive vault and get the application working" & @CRLF & _
        "  1.0.278 | 06-Aug-2015 | Only Myself      | Minor improvement to display to amendment history screen with better readability, colour and font usage" & @CRLF & _
        "  1.0.279 | 11-Aug-2015 | Only Myself      | Minor amendment to replace an external UDF which was uncompatible with XP and even took the App down with it" & @CRLF & _
        " ---------------------------------------------------------------------------------------------------------------------------------------------------"


            _ExtMsgBoxSet(5, $SS_LEFT, 0xE8EDFC, -1, 9, "Courier New")
            _ExtMsgBoxSet(-1, -1, -1, -1, -1, -1, @DesktopWidth - 20, @DesktopWidth - 20)
            _ExtMsgBox(64, "OK", "2015 Changes", $Whats2015)

And found that I had to make the change shown below for it to work for me:

; Get message label size
    While 1
        Local $aLabel_Pos = _StringSize($sText, $g_aEMB_Settings[4], Default, $iExpTab, $g_aEMB_Settings[5], $iMsg_Width_Max - 20 - $iIcon_Reduction)
        If @error Then
            ;If $iMsg_Width_Max >= $iMsg_Width_Abs Then
            ;Changed this from $iMsg_Width_Abs to $iMsg_Width_Abs * 10 to allow for very large notes with embedded carriage returns
            If $iMsg_Width_Max >= $iMsg_Width_Abs * 10 Then
                Return SetError(6, 0, -1)
            Else
                $iMsg_Width_Max += 10
            EndIf
        Else
            ExitLoop
        EndIf
    WEnd

Is this something that can may be added to any new version please or do I need to remember to make the change myself?

Thanks :)

 

  • Moderators
Posted

Tippex,

Your code works for me without problem - all the text is displayed within the ExtMsgBox and the line breaks occur where they should. What happens when you run it? Do you get @error set to 6? If you get something which is badly formatted, can you post an image? And why the 2 _ExtMsgBoxSet calls? Why not combine them?

As to the more general point, the $iWidth_Abs parameter is set by the user to determine the absolute maximum width so changing the code to override this internally does not seem a very good idea to me. If we can determine why you do not get the required result, that would be a better solution than you arbitrarily changing the code.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Posted

Ever so sorry!!  I must have compiled with the: 

_ExtMsgBoxSet(-1, -1, -1, -1, -1, -1, @DesktopWidth - 20, @DesktopWidth - 20)

commented out :( (I had these lines split whilst troubleshooting but will now combine them).

leaving  $iWidth & $iWidth_Abs at their default values results in nothing being displayed but specifying @DesktopWidth - 20 for them does indeed work.

  • Moderators
Posted

Tippex,

No problem - glad you found the probem so I did not have to go through a long (and obviously fruitless) debugging session!

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

  • 4 months later...
Posted

Melba, I have always enjoyed this UDF when I have reason to use it.

I am working on a little product and could use this, with one exception.

By default your buttons are auto width side by side, is there any way to get my buttons vertical full length?  

I need to fit entire sentences in the button as I am doing a multiple choice q&a script.

  • Moderators
Posted

ViciousXUSMC,

I need to fit entire sentences in the button

Which suggests to me that this is not the best way for you to go. Small dialogs such as these are not intended to hold large data blocks - I think you would be better served by designing your own GUI. My StringSize UDF will help you correctly size the buttons and thus the GUI to hold them - by all means start a GH&S thread if you run into problems.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

  • 2 months later...
Posted

Aside from making my GUI topmost, is there a setting to make it modal (that is, it has the focus and no other windows can be activated until my GUI is closed)?

Thanks M23 for this UDF.

  • Moderators
Posted (edited)

frankg2,

No modal setting I am afraid.

M23

Edit: But you could do something like this:

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

#include "ExtMsgBox.au3"

$hGUI = GUICreate("Test", 500, 500)

$cEMB = GUICtrlCreateButton("EMB", 10, 10, 80, 30)

GUISetState()

While 1

    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE
            Exit
        Case $cEMB
            $hModal = GUICreate("", @DesktopWidth, @DesktopHeight, 0, 0, $WS_POPUP)
            GUISetBkColor(0x000000)
            GUISetState()
            WinSetTrans($hModal, "", 100)
            _ExtMsgBox(0, "Close", "Modal", "Try activating another window!")
            GUIDelete($hModal)
    EndSwitch

WEnd

 

Edited by Melba23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

  • Moderators
Posted

frankg2,

Quote

not for me as a beginner

On the contrary, I would have said that it was a perfect solution for a beginner as it requires nothing more than a "cut'n'paste" to work in your (or any)  script. But it is your decision.....

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

  • 4 weeks later...
Posted

Hey! How do I get this to work with this UDF? I tried it with the normal MsgBox() but realized soon that it couldn't solve my problem.

 

Dim $sArray[1]
   $count = _GUICtrlListView_GetItemCount($ListView1)
    $aCount = 0
    For $i = 1 To $count Step 1
        If _GUICtrlListView_GetItemChecked($ListView1, $i-1)  = True Then
            $sArray[$aCount]=_GUICtrlListView_GetItemText($ListView1, $i - 1, 1)
            ReDim $sArray[UBound($sArray) + 1]
            $aCount += 1
        EndIf
     Next

I want some text and then list all the items in $sArray[$aCount]. I want it like:

 

Proceed?

1. $sArray[1]

2. $sArray[2]

3. $sArray[3] and so on...

  • Moderators
Posted

pranaynanda,

Just concatenate the array elements (with intervening @CRLFs) into a string which you can then use in the UDF.

But I would counsel against using a standard MsgBox or my UDF for this as if the array is of any size you will quickly get a string which will not display fully within the display limits. I would strongly advise using a GUI with a ListBox which will automatically scroll to display all the elements while allowing you to add button controls for user input. If you are unsure of what I mean then open a a new thread in GH&S and I will explain in more detail.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

  • 3 months later...
Posted (edited)

Hey Melba, great UDF!! I've come across an issue, though (and I'm sure it's with my code, not yours ;)) What might cause the GUICtrlCreateButton() function in this UDF to use higher control ids?

For instance, in a sample script with 4 buttons, the ids for the buttons are 6, 7, 8, 9 and everything works great - I get the correct return values. However, in a script that was working, the ids are now created as 265, 266, 267, 268 which makes the return value not work properly. The GUICtrlCreateDummy() function sets its control as 5 in both working and non-working cases.

Any idea why this is happening?

Edited by buymeapc
  • Moderators
Posted

buymeapc,

There is nothing in the UDF that should affect the ControlIDs of any other controls.

Can you post the script concerned so I can take a look? Send it by PM if you do not want to post it in open forum.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

  • Moderators
Posted

[BUGFIX VERSION] 9 Aug 16        (exactly 1 year since the last!)

Fixed: The UDF depended on all buttons having consecutive ControlIDs - which is not always the case. Code rewritten to remove this requirement. Thanks to bymeapc who discovered the problem

New UDF and examples in first post.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Posted
On 8/9/2016 at 5:11 AM, Melba23 said:

[BUGFIX VERSION] 9 Aug 16        (exactly 1 year since the last!)

Fixed: The UDF depended on all buttons having consecutive ControlIDs - which is not always the case. Code rewritten to remove this requirement. Thanks to bymeapc who discovered the problem

New UDF and examples in first post.

M23

Thanks for implementing this fix so quickly!! Downloading now B)

  • 1 month later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...