Jump to content

EditControl Scrollbar Problem


Recommended Posts

Hi,

I have a problem with the scrollbar in edit control.
In my case I use richedit, but it appears also in the "normal" editcontrol.

The problem ONLY appears, when working with my program (including editcontrol) and another program like notpad on the other screen.
It appears when using the scrollbar of notepad, then my scroll bar and so on ... (vertical scrollbars only)
and then suddenly the area behind my scrollbar gets highlighted (black) like selected, above and below,
if i move the mouse to the left during pressing, the whole area behind the scrollbar gets highlighted in black.

When my program is loaded alone the problem NEVER happens.

I have made two screenshots, 1st one when the problem appears, and the second one showing when moving to the left.

I really have no idea and there is nothing special in my editcontrol.

I would be really thankful, if someone could help me further to get this issue solved.

thanks in advance

cheers mike

scrollbar1.thumb.jpg.c6ce0d1ba2b5b3ad3cee0d1ff212013d.jpg

scrollbar2.thumb.jpg.898987d81b3f85fbd36c500f3d550ba6.jpg

 

Edited by mike1950r
Link to comment
Share on other sites

hi,

is there any chance perhaps to help with this very annoying problem?

as far as i've tested this only occurs in a minimum 2 screens setup.

easy to test one screen the autoit editcontrol and on the other one notepad.

just scroll on both for a while.

thanks mike

Link to comment
Share on other sites

2 hours ago, argumentum said:

Good color balance in those screenshots. So...., where's the code ?. Is it a code problem or a picture problem ?

Hi,

thanks for your answer.

it's a bit complicate to post the code, cause it contents a lot of stuff of my personal library.

i tried to reduce it to the minimum and i got the impression,. that this reduces the error cases.

so i think it's just a memory problem between the open editor programs at the same time.

i try to get more light into this and find out, where i can reduce code to eliminate errors.

the question is, how i can focus on the activated editor and release the memory for the other at that moment,

say switching between the programs..

cheers mike

 

Link to comment
Share on other sites

Hi again,

i've testing a while for this really strange issue.

i'm pretty sure that this is no code problem, cause it's working without any problems when working only on one screen.

if i work on two screens, say my program on first screen and for example notepad on second screen,

the problem occurs. but if i minimize notepad on second screen, the problem does not occur anymore.

this is reproducable.

 

if someone could help me further, this would really be great.

thank you mike

 

 

Link to comment
Share on other sites

  • Moderators

mike1950r,

Quote

if someone could help me

I would not hold your breath. You are running a completely unknown script which only glitches on a two-screen setup, which is not that common. Not exactly a great deal to go on, is it?

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

Hi Melba,

i tried to find out where the problem comes from and removed features of my program until it does not make the problem anymore.

as far as i found:

when i remove the context menu part, the edit control seems to run without glitches.

so i attach this part as bug.au3.

may be someone could have a look into and see what the problem is.

thanks in advance.

cheers mike

 

bug.au3

Link to comment
Share on other sites

  • Moderators

mike1950r,

Any particular reason why you are subclassing the edit control to use the context menu rather then using the (IMO) simpler Windows messaging method used in the example for _GUICtrlMenu_TrackPopupMenu in the Help file? Personally I avoid subclassing like the plague unless I absolutely have to use it to solve a particular problem.

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

Hi again,

i rewrote the context to fit your propose.

the problem is, that the context menu only is displayed if i right click in the area of the menubar of the parent of the richedit control.

i need it to be displayed when clicking inside the richedit control,

to select something and right click on copy for example.

with my procedure like in the attached file this was working fine.

(but it created the glitches as reported)

it was the only example i found, which was working.

so what can i do?

cheers mike

Link to comment
Share on other sites

  • Moderators

mike1950r,

I found the script from which you copied your code and it does seem that subclassing is necessary for any form of Edit control context menus because of the existing system context menus. But I am at a loss as to why doing this would cause the problem you see with the scrollbars, so I do not think I can help any further - sorry.

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

Hi Melba,

i was thinking for a solution, and found one.

i attach it as file.

It's working exellent and there are no more glitches.

i splitted the other one in to different procedures command and notify.

Think this can help other users for the context in richedit without glitches.

thanks for everybody, who tried to help.

cheers mike

context.au3

Link to comment
Share on other sites

  • Moderators

mike1950r,

Well done! Always satisfying to get a solution yourself.

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

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
 Share

×
×
  • Create New...