ThemedContainer title not updating


Author
Message
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (4.8K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
I have a ThemedContainer that I'm changing the title when the body is hidden/shown. The title is updated correctly, but the new title and the change in the chevron doesn't update the display, unless the user moves the mouse over the title bar of the themed container. Do I need to do something to get the title to update? I tried the Update() method but that didn't seem to work.



E.g.



When themed container is hidden the title says: "Process Info: {0}" ({0} replaced by the process name)

When themed container is shown the title says: "Proces Info"



What happens:



The container is initially shown.

The user clicks the chevron to hide it.

The body is hidden, title is unchanged, chevron is unchanged.

The user moves mouse over chevron (not clicking, just moving)

The title and chevron change.
Replies
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
Try calling this:

MyThemeContainer.Invalidate()

Greg McGuffey
Greg McGuffey
Strategic Support Team Member (4.8K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
This did a little bit.



When the form goes from collapsed to expanded, Invalidate does fix the chevron and based on screen flicker also redraws the body of the control, but not the title. When it goes from expanded to collapsed, it does nothing (title and chevron are not affected). If I move the mouse (click isn't needed) over the chevron, the title is updated.



Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
I will have to look at the code and see what is going on...we try to reduce rendering and drawing to improve performance...so every piece is not drawn everytime.  You might be able to just set the Title text property and it would re-render the title area.
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (4.8K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
That's what I'm doing...here is the code for the BodyHidden event handler:





ThemedContainer1.Title = "some title text"

' Later I added

ThemedContainer1.Invalidate()

' then I tried

ThemedContainer1.Refresh()





With this code the title isn't refreshed. I see in the source code that it is calling RedrawControl(RedrawOptions.TitleOnly) so it should be redrawing it Blink



Maybe it has something to do with setting it in the BodyHidden event handler?



I'm using Win2k SP4.
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
No...it is in the code.  There is a buffer image that stores off the title.  I will have to look at this later and get back with you.
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (4.8K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
Thanks
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (4.8K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
More information for when you get around to looking at this...



This only happens when the container is set to scroll. If it is set to snap, then the title updates correctly, without any call to Invalidate or Refresh.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Greg McGuffey - 19 Years Ago
Trent L. Taylor - 19 Years Ago
Greg McGuffey - 19 Years Ago
Trent L. Taylor - 19 Years Ago
Greg McGuffey - 19 Years Ago
                         No...it is in the code. There is a buffer image that stores off the...
Trent L. Taylor - 19 Years Ago
                             Thanks
Greg McGuffey - 19 Years Ago
                                 More information for when you get around to looking at this...
...
Greg McGuffey - 19 Years Ago
Chan - 17 Years Ago
Trent L. Taylor - 17 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search