StrataFrame Forum

Is this possible with ThemedContainer???

http://forum.strataframe.net/Topic23370.aspx

By William John Tello - 6/5/2009

Here is the deal:



I have dropped six ThemedContainer controls each with a ToolStrip control and a ListView control in a FlowLayoutPanel control. On the FlowLayoutPanel control I have set the AutoScroll property to True, the FlowDirection property to TopDown and the WrapContents property to False. This basically allows the ThemedContainer controls within the FlowLayoutPanel control to be scrolled vertically - just what I wanted.



Now, all I want to do is to be able to resize vertically each ThemedContainer control separately within the FlowLayoutPanel control. Basically, when I hover over the bottom border of a ThemedContainer control, I want to see an updown arrow cursor appear and I want to be able to click and drag the bottom of the ThemedContainer Control either up or down to make it vertically larger or smaller, respectively.



Does anyone have any ideas on how to do this?
By Trent L. Taylor - 6/5/2009

I am in the process of writing a control just for this purpose in our medical app. What issue are you fighting? Are you have a hard time removing and re-inserting the container? FWIW, this is definitely doable.
By William John Tello - 6/5/2009

Hello Trent:



I have had no troubles getting inserting the containers I need into the FlowLayoutPanel control. There are six of them, and they will never need to be removed. I'm just finding that the StrataFrame ThemedContainer panels that I'm using are not resizable and I didn't find any properties that I could set to make them so. (I currently really only care about resizing them vertically myself.) I'm assuming to do this, I would need to modify the StrataFrame source for the ThemedContainer control?



It sounds like you are creating a completely new control to do this? Will it become a part of StrataFrame in the near future?



I appreciate all of your help and insight with this.
By Trent L. Taylor - 6/5/2009

I'm assuming to do this, I would need to modify the StrataFrame source for the ThemedContainer control?




Why can't you just set the height of the control? Adding logic to make this sizable by mouse is not implemented...and would be a fair amount of work. Not hard, but just to ensure nothing else "breaks" would require some effort.



It sounds like you are creating a completely new control to do this? Will it become a part of StrataFrame in the near future?




Yes, I am. And yes, in the future it will most likely make it into the framework. There are going to be 3-4 new controls being adding into the framework very soon that will be helpful...but won't resolve this issue for you.
By William John Tello - 6/5/2009

We could set the height on the control, but we really wanted to make it user adjustable, which sounds like it is what you are working on yourself.



If the answer is that to do exactly what we want, I would have to modify the StrataFrame source code, then that's what the answer is and we can evaluate if it is worth putting my time into from there. I've been a C/C++ and now C# developer for a long time and I've written many custom controls in the past, so I know it is doable - the real question at this point is, is it worth the time.



On the other hand, if you are doing the exact same thing and wouldn't mind sharing it, it would be appreciated, but it is understandable, if you cannot.



Again, thank you for your help and insights into my situation.
By Trent L. Taylor - 6/5/2009

We could set the height on the control, but we really wanted to make it user adjustable, which sounds like it is what you are working on yourself.




Not with this control, we have different needs.





If the answer is that to do exactly what we want, I would have to modify the StrataFrame source code, then that's what the answer is and we can evaluate if it is worth putting my time into from there. I've been a C/C++ and now C# developer for a long time and I've written many custom controls in the past, so I know it is doable - the real question at this point is, is it worth the time.




You have the source, but it is in VB. But if you want to copy this code and re-write the control to meet your needs then go for it. This way you are not changing the SF code so you can just load updates in the future. In truth, you may be able to just inherit this control and then override the OnMouseMove and add your logic for resizing. This way it is encapsulated. This would be the road I would go down first.



On the other hand, if you are doing the exact same thing and wouldn't mind sharing it, it would be appreciated, but it is understandable, if you cannot.




The control in which I am referring is not the same as this control. It is far more involved and has the ability to add links to a header, etc. It is a container control like the ThemedContainer, but it serves a slightly different purpose. As mentioned, though, once put through the trials and tests, it will most likely make it into the framework. But for now it is a ways out of being ready for multi-purpose distribution.
By Greg McGuffey - 6/5/2009

Related to the issue of how to manage getting a control to be resizable at runtime, this article might help.

http://www.codeproject.com/KB/dotnet/Resize_Control_at_Runtime.aspx



This one is more complicated, but it does explain some of the concepts needed.

http://www.codeproject.com/KB/vb/controlresize.aspx



Good luck with this!