![]() |
Changing the title of a pane |
Post Reply ![]() |
Author | |
Maui ![]() Groupie ![]() Joined: 10 June 2004 Status: Offline Points: 95 |
![]() ![]() ![]() ![]() ![]() Posted: 18 January 2005 at 4:08pm |
I have created a pane. The pane shows the contents of a folder. I want to set the title of the pane to be whatever the current directory on show is. I used this code. Set P = .DockingPane.FindPane(ID_PANE_GALLERY) The Title doesnt change even though I can see with the debug that the correct info is being passed. There is no .refresh method so Im not sure what to do next? Please dont tell me that the only answer is to destroy and then recreate the pane. Thanks
|
|
![]() |
|
nighthawk ![]() Senior Member ![]() ![]() Joined: 11 June 2004 Status: Offline Points: 167 |
![]() ![]() ![]() ![]() ![]() |
Try adding the line:
P.RedrawPanes after setting the title. |
|
![]() |
|
Maui ![]() Groupie ![]() Joined: 10 June 2004 Status: Offline Points: 95 |
![]() ![]() ![]() ![]() ![]() |
Cheers .DockingPane.RedrawPanes works as long as the panes are docked. If the panes arent docked then they arent effected until they are redocked. CJ support - Pls log this as a bug. |
|
![]() |
|
Boyd ![]() Senior Member ![]() Joined: 08 December 2003 Location: United States Status: Offline Points: 285 |
![]() ![]() ![]() ![]() ![]() |
I found this a long time ago and created a workaround for it. I figured this would have been fixed by now, but I guess not. This work-around was designed before the ThemedFloatingPanes option was introduced, so I don't know how that will affect it, but you can play with it to make it work. The general idea behind this was that a floating pane was actually a window with a title bar. The workaround was to use the 'SetWindowText' API function to directly change the title of the window. I wrapped it up into a function that took three parameters... the DockingPane object, the ID of the pane to update, and the new title. Declare Function SetWindowText Lib "user32.dll" Alias "SetWindowTextA" (ByVal hWnd As Long, ByVal lpString As String) As Long At the time, I don't think the 'RedrawPanes' method existed, so I used 'RecalcLayout' instead. I'm sure you can tweak this to accomplish what you need. Hope this helps! Of course, it'd still be nice if Codejock can wrap up a resolution to this. |
|
![]() |
|
Maui ![]() Groupie ![]() Joined: 10 June 2004 Status: Offline Points: 95 |
![]() ![]() ![]() ![]() ![]() |
Looks great. Thank you for your help. I will let you know how I get on. |
|
![]() |
|
Maui ![]() Groupie ![]() Joined: 10 June 2004 Status: Offline Points: 95 |
![]() ![]() ![]() ![]() ![]() |
Had 5 mins this morning on the PC and tried your suggestion but it didnt work. Wont have time to get on the PC for a few days so it will be a while before I can test this further. Here's hoping that the next release will address this problem.
|
|
![]() |
|
Boyd ![]() Senior Member ![]() Joined: 08 December 2003 Location: United States Status: Offline Points: 285 |
![]() ![]() ![]() ![]() ![]() |
Sorry... I think I used this back in the v8.x days, so I guess it doesn't work anymore.
|
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |