Jump to content

Recommended Posts

Posted

Hi all,

I am trying to code a gui, which elements are created dynamically, so the gui has to be scrollable.
Therefore I use Melba's Scrollbars-Library.

However. When the sizes in "_GUIScrollbars_Generate($hGUI, 600, 902)" are bigger then the GUI itself
it doesnt call the Function assigned to...
GUI 600x900, GUIScrollbars 600x901 -> not working

GUI 600x900, GUIScrollbars 600x899 -> works!

Do you have a solution for me?
 

#include "GUIScrollbars_Ex.au3"
#include <GUIConstantsEx.au3>
Opt("GUIOnEventMode", 1)  


$hGUI = GUICreate("MyApp", 1000, 900)

$idInput = GUICtrlCreateInput("Input", 120, 20, 80, 25)
    GUICtrlSetOnEvent(-1, "__EVENTCATCHER")
    GUICtrlCreateUpdown(-1)
    
_GUIScrollbars_Generate($hGUI, 600, 902)

GUISetState()


While 1
    sleep(1)
WEnd

Func __EVENTCATCHER()
    MsgBox(64, "Info", "Message")
EndFunc

 

 

  • Moderators
Posted

atvaxn,

Strange things happen when you generate scrollbars in Windows! I have no idea why, but it does seem that the event is not registered once the scrollbars are generated in your script. But if you create the input AFTER generating the scrollbars everything works just fine for me.

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 (edited)

hey Melba,
first, just many many thanks for your fine UDFs in general. I just love them. Simple und easy to use. 👌

For the Scrollbars, I tried to swap the orders, in many variations, but none of them made the function the run.
 

#include "GUIScrollbars_Ex.au3"
#include <GUIConstantsEx.au3>
Opt("GUIOnEventMode", 1)  


$hGUI = GUICreate("MyApp", 1000, 900)

_GUIScrollbars_Generate($hGUI, 600, 902)

$idInput = GUICtrlCreateInput("Input", 120, 20, 80, 25)
    GUICtrlSetOnEvent(-1, "__EVENTCATCHER")
    GUICtrlCreateUpdown(-1)
    
GUISetState()   
    
    
While 1
    sleep(1)
WEnd


Func __EVENTCATCHER()
    MsgBox(64, "Info", "Message")
EndFunc

 

Edited by atvaxn
  • Moderators
Posted

atvaxn,

Your script as posted works fine for me. The MsgBox appears when {Enter} is pressed and the input content has been altered - which is exactly as expected. Do you not get the same result?

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

oh, now I know what you mean.
well, I need the function to be called, as soon as the updown-arrow is clicked, not only when Enter is pressed :)

the reason is, that I need the values in the inputbox to count up/down in smaller steps. (0 > 0.2 > 0.4....)
So my idea was to call a function, which modifies the inputbox manually with predefined increasing/decreasing steps.

I hope you understand what I mean :)

 

  • Moderators
Posted

atvaxn,

I usually cheat like this:

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

 

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...