CommandBars |
Post Reply |
Author | |
Bob
Newbie Joined: 17 June 2006 Status: Offline Points: 9 |
Post Options
Thanks(0)
Posted: 19 October 2007 at 1:30pm |
I have an SDI form and want to add a second ToolBar with only 5 or 6 buttons somewhere on the middle left side of the same form. I saw in an earlier post that a picture box could be used to do this but the post didn't describe the process. How do I go about adding a toolbar in a picture box and getting it where I want on my SDI form? Where do I add the second CommandBar control and where do I write the code? I'm new at using the control and could use some help with this. Thanks
|
|
Bob
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Just add another CommandBars to picture box and create same toolbar.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Bob
Newbie Joined: 17 June 2006 Status: Offline Points: 9 |
Post Options
Thanks(0)
|
That worked fine except my second toolbar had a visible rectangle around the 3 test bmp's that i used. These bmp's were the same as those used in my form's main menu & toolbar which works fine. I used a Skin control and the rectangle is clearly visible no matter which skin style I select.
Note: I named the 2nd CommandBar as CommandBarPic and dimensioned the 2nd toolbar as ToolBar2. Is this okay?
1. How do I get rid of that annoying rectangle?
2. The picture doesn't automatically stretch to display all 3 of the bmp's even though the AutoSize property is set to "True". Should it stretch and show all 3 bmp's?
Again, thanks
|
|
Bob
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
Think its border of rectangle. Just Remove borders for rectangle.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Bob
Newbie Joined: 17 June 2006 Status: Offline Points: 9 |
Post Options
Thanks(0)
|
How do I get rid of the rectangle? I searched CJ's Help file and all I found was GetWindowsRect method...I didn't see anything on how to "hide" or eliminate the rectangle for the CommandBar.
Thanks,
|
|
Bob
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hello,
Attach sample application. I'm not sure what do you see.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Bob
Newbie Joined: 17 June 2006 Status: Offline Points: 9 |
Post Options
Thanks(0)
|
Oleg,
Attached is the sample app: uploads/20071031_065026_PicBox_ToolBar_.ZIP
The code for the PicBox and 2nd CommandBar is at the end of the Form Load event. I used the Skin Control to Skin the app. I would like to hide the toolbar rectangle and only have the buttons appear (see bitmaps in .zip file). Maybe this is not possible with the CommandBar Control?
Note: I tried to attach one of the bitmaps here but text kept popping up in the "Preview" portion of the Image Properties Window when I tried to upload the image, and the "Ok" button was disabled. Why couldn't I attach an image to this post?
Thanks,
|
|
Bob
|
|
gaudetm
Senior Member Joined: 23 September 2006 Location: Canada Status: Offline Points: 134 |
Post Options
Thanks(0)
|
change visualtheme of second commandbars to office 2003 then no borders
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
or call
CommandBarsPic.PaintManager.FlatToolBar = True
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Bob
Newbie Joined: 17 June 2006 Status: Offline Points: 9 |
Post Options
Thanks(0)
|
Thanks Oleg & qaudetm... I went with Oleg's suggestion and I also set CommandBarPic.Visual Theme to xtpThemeOffice2000. This appears to work best since my app allows the user to apply a selected "skin". The form for skinning is from CJ's SkinMdi Sample and uses only those skins. I don't know if this will work with other skins or not. I do know that if you apply some of the other Visual Themes to the CommandBar, no matter what the skin style is, the rectangle will still appear.
It would be nice to have a PictureBox with transparency. I did find an ActiveX Control (PictureBox) on the web at DevPower for bitmaps and other images but I haven't tried it. The site says it's written in VB6.
Again, thanks
|
|
Bob
|
|
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 |