Jump to content

New _ArrayDisplay Beta code - comments and suggestions welcomed


Melba23
 Share

Recommended Posts

You can also add a flag "maximized"

If BitAND($iFlags, 8) Then GUISetState(@SW_MAXIMIZE, $hGUI) ; Yes? )))

Please tell me what you want changed - because I have no idea what you are complaining about this time

Call($sUserFunc, $avArray, $aiCurItems, $cListView, $hGUI)

I want that it was after careful consideration, and not because I'm complaining.

Edited by AZJIO
Link to comment
Share on other sites

  • Moderators

AZJIO,

Sorry, "complaining" was a bad choice of words. I do carefully consider your requests - some I have accepted, others not. But I am not adding either of those. The first is one click of a button on the dialog, and I have already explained that the additional parameters for which you are asking are easily obtained within the User function itself if required.

But I would like some explanation of the "If the dialog box has blocked handler of the parent window, it should block the window itself" comment you made above - and I have no idea what the accompanying code snippet is supposed to show. :huh:

M23

P.S. I have just seen your "You have a window is limited to 100 pixel" comment. What 100 pixel limit? The dialog has a minimum size of 250x250 pixels ($iMinSize = 250) so from where do you get the value of 100? :huh:

Edit: And now I have seen your additional explanation. I feel some form of border is required - 50 pixels a side seems reasonable to me. As I mentioned above, maximising the dialog is one click of a button so I see no reason the make the dialog any larger intially..

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

 

Link to comment
Share on other sites

 

and I have no idea what the accompanying code snippet is supposed to show.

.

Func _UserFunc($aArray, $aSelected)
...
    MsgBox($MB_SYSTEMMODAL, "Hi", "Running the user defined function" & @CRLF & @CRLF & "Rows selected: " & $sSel)
    MsgBox($MB_SYSTEMMODAL, "Hi", "Running the user defined function" & @CRLF & @CRLF & "Rows selected: " & $sSel, 0, $hGUI) ; $hGUI is required for correct

.

Link to comment
Share on other sites

  • Moderators

AZJIO,

I understand now. But the User function will not necessarily show a MsgBox - most people seemed to want it to save the array, or the selected rows, to a file. And if the user does want to block the main dialog it is, as I have explained several times, not difficult to get the required handle from within the function itself. :)

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

 

Link to comment
Share on other sites

Here is a complete example

http://pastebin.com/fxe86zZL

 

I changed a way of coloring

Local $odd = False
    Local $cItem
    For $i = 0 To UBound($avArrayText) - 1
        $cItem = GUICtrlCreateListViewItem($avArrayText[$i], $cListView)
        If $iAlt_Color Then
            If $odd Then GUICtrlSetBkColor($cItem, $iAlt_Color)
            $odd = Not $odd
        EndIf
    Next
I removed a line

; GUICtrlSetBkColor($cListView, $_ARRAYCONSTANT_GUI_BKCOLOR_LV_ALTERNATE)
If you do not, then painted only the odd lines

----------

Why getting selected items within the function _ArrayDisplay_Beta? This can be done in an external function _UserFunc. This solution of your task within _ArrayDisplay_Beta, instead of granting to the user to solve his problems.

Edited by AZJIO
Link to comment
Share on other sites

  • Moderators

AZJIO,

That colouring code offers no advantage that I can see over the current method. As to why the selected items are passed - good question and I will consider whether to remove it. :)

All,

Final 10 minutes for comments. ;)

M23

Edit:

And that is it. Thanks to all who contributed - look out for this new _ArrayDisplay in the next Beta release. :)

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

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

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