I designed a GUI interface that synchronizes multiple windows and allows value edits....
I'm getting a lot of flashing due to lists and tree controls being updated... which I don't like but I can live with.
However, the issue that really bites is the fact that when I use
DialogControlSet(Handle, "I_TreeView", 6, sSelection) ; set tree control to last user selection
it either stays static or jumps to the bottom of the window.
If I scroll the control to have sSelection in the middle of the window before using...
DialogControlSet(Handle, "I_TreeView", 6, sSelection) ; set tree control to last user selection
it either stays static or jumps to the top of the window.
If anyone has overcome this problem... I'd love to know how I can have the control behave in a consistent manner.
Thanks in advance,
RH
WIL dialogs do not natively support a 'tree' control. Which WIL dialog control are you sending the DC_ITEMBOXSELECT to? Several control will accept that value.
An ItemBox
Make sure you are "Break"ing/"Return"ing out of the callback routine in the appropriate places rather than checking/refreshing "everything" with every loop of the CallBack.
Jim
Thanks Jim... I'll take a second look at break points.
Probably should have clarified my response earlier. I sometimes have to use a Return -1 after some controls to avoid such behavior as the Breaks don't always do what I expect. Not sure why or what causes the behavior as I don't even have code that is updating the control but will see that type of behavior where it seems to refresh everything so I get a bit of a blinking effect.
Jim
Example:
Case DialogProcOptions(JTa_Handle,dpo_getnumber,"dl_JTa_extra1_x")
extra1_x = DialogControlGet(JTa_Handle,"dl_JTa_extra1_x",dc_itemboxselect)
Return -1
Break
Case DialogProcOptions(JTa_Handle,dpo_getnumber,"dl_JTa_extra2_x")
extra2_x = DialogControlGet(JTa_Handle,"dl_JTa_extra2_x",dc_itemboxselect)
Return -1
Break
Case DialogProcOptions(JTa_Handle,dpo_getnumber,"dl_JTa_extra3_x")
extra3_x = DialogControlGet(JTa_Handle,"dl_JTa_extra3_x",dc_itemboxselect)
Return -1
Break
Case DialogProcOptions(JTa_Handle,dpo_getnumber,"dl_JTa_extra4_x")
extra4_x = DialogControlGet(JTa_Handle,"dl_JTa_extra4_x",dc_itemboxselect)
Return -1
Break
Thanks for the heads up Jim... I'll try it with
Case x
'Code'
Return -1 ; new line
Break
I seem to recall reading a post at some point that mentioned suspending/pausing the dialog while background processing took place...
Have you had any luck with this reducing flashing Jim?
If you have a process that takes a while to run it is best to disable the dialog using DialogProcOptions. I mainly responded to the flashing behavior but since I'm not exactly sure what all you are doing it is hard to respond with any definite answer. After re-reading your original post I may have misunderstood. The blinking I was talking about was occurring in the normal use of things. If you have everything in a loop and are updating everything with every loop perhaps move the update part to at the end of whatever process gathers all the data. Again, this may not be what you are doing so can't offer much more. If the the DialogControlSet is jumping to an inappropriate place in the list that often means the value you are assigning isn't in the list. May want to verify the value and list.
Jim