Results 1 to 10 of 10
  1. #1
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Designer Background (A2000)

    Just trying to jazz a couple of my forms up a little.

    I've embedded a gradient background to one form but another is causing a problem.
    I have combo boxes used as menu's and can't seem to make them transparent.

    I,ll probably have to re-design these unless some-one knows how to manipulate the combo's so they are transparent.

    Anybody any idea's or a better solution for my menu's ?
    Attached Files Attached Files

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Designer Background (A2000)

    Even if you set the Background Style property of a combo box to Transparent, this will only hold if the control doesn't have the focus. The moment it gets the focus, it acts as if the Background Style is set to normal. This also holds for text boxes. I don't know of a way to get around that.

    Alternatives:
    1. <LI>Create a switchboard form using the Switchboard Manager, and then modify the way it looks. The switchboard form uses buttons and labels; labels are transparent even if you click them. Access doesn't care how you modify the look of the switchboard form once it has been created
      <LI>Build a "real" custom menu bar:
      <UL><LI>Right-click a toolbar and select Customize...
      <LI>In the Toolbars tab, click New...
      <LI>Enter a name, then click OK.
      <LI>Click Properties, and set the Style to Menu Bar.
      <LI>Click OK, then drag the new toolbar (now menu bar) to the top.
      <LI>Select the Commands tab of the Customize dialog.
      <LI>In the Categories list, select New Menu
      <LI>Drag New Menu from the Commands list to the new menu bar.
      <LI>Right click the New Menu to set its caption.
      <LI>Left click the New Menu to open it.
      <LI>Drag commands you wish to display to the menu.
      <LI>Repeat if you wish to create more menus on your new menu bar.
      <LI>When you're done, close the Customize dialog.
      <LI>Select Tools/Startup...
      <LI>Set your new menu bar to be used nstead of the default one.
    [/list]The first option is probably the easiest. Unforunately, neither option will look exactly the way your example does.

  3. #3
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Designer Background (A2000)

    Hans

    Thanks for the tips, option 1 seems to be better.

    One thing.

    The two options:

    Open Form In Add Mode
    Open Form In Edit Mode

    What's the difference between them.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Designer Background (A2000)

    The "Open Form in Add Mode" opens the form with only a blank new record visible; the existing records aren't shown. Use this option to allow the user to enter new records only.

    The "Open Form in Edit Mode" opens the form the usual way.

    If you look at the code behind the Switchboard form, look for the HandleButtonClick function. This function handles clicking on the command buttons and labels. The "Open Form in Add Mode" option calls DoCmd.OpenForm with the DataMode argument set to acAdd, while the "Open Form in Edit Mode" option doesn't specify the DataMode argument, so the form is opened the standard way (corresponding to the settings in the Data tab of the Properties window for the form).

  5. #5
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Designer Background (A2000)

    Thanks Again Hans

  6. #6
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Designer Background (A2000)

    The "SwitchBoard Manager" will only allow eight entries per switchboard.
    By opening the source table you can add more, but, when selecting >8 in form view, the S-Board will only open the eighth entry.

    Is there a way to allow more, I've checked the code and can't see any limitations there.

  7. #7
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Designer Background (A2000)

    It *is* possible to change this, but whether you should is something else:
    <UL><LI>The Switchboard form was designed to present menu options in a clear, conveniently arranged way. You can use sub-switchboards to organize the options into groups. My experience is that 6 to 8 entries is the optimum - it's easy for the user to view them quickly and select the appropriate option. If you were to create long lists of entries, it gets harder to get a quick overview.
    <LI>If you change the number of entries, you won't be able to use the Switchboard Manager to edit the menu options any more - the number of eight entries is hard-coded into the Switchboard Manager.[/list]If you still decide to increase the number of entries, you should do the following:
    <UL><LI>Duplicate a set of button + label.
    <LI>Name the first new set Option9 and OptionLabel9.
    <LI>Set the OnClick event of both to =HandleButtonClick(9).
    <LI>Repeat the previous steps as many times as you need, replacing 9 by 10, 11, ...
    <LI>Open the module behind the Switchboard form.
    <LI>Find the statement Const conNumButtons = 8.
    <LI>Replace the 8 by the total number of buttons you now have.
    <LI>Edit the Switchboard Items table manually from now on.
    <LI>To create a new (sub)switchboard, create a record with:
    SwitchboardID = a unique number decided by you.
    ItemNumber = 0.
    ItemText = the caption of the (sub)switchboard.
    Command = 0
    Argument = null (leave blank)
    <LI>To create entries in the (sub)switchboard), create records with:
    SwitchboardID = ID of the switchboard the entries belong to
    ItemNumber = 1, 2, ...
    ItemText = the caption of the entry (use & to underline a letter)
    Command = number of the command, see the module behind the Switchboard form for the meaning of the values.
    Argument: depends on Command; it can be the ID of a switchboard to go to, or the name of a form,report or VBA function.[/list]As you see, you have to do a lot of work manually that the Switchboard Manager does automatically if you restrict yourself to 8 items.

  8. #8
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Designer Background (A2000)

    Hans
    Silly me, I was so close.
    I had already done all as your prev post but had forgotten to change each click routine, they were all set to (8) <img src=/S/blush.gif border=0 alt=blush width=15 height=15>

    I see your point with having too many options to visually look at. As you can see with my attachment, I've tried to give the user clear visibility.

    On my second pic, you'll notice I've made the option command buttons transparent until they get focus and back again once lost focus.

    Private Sub Option1_GotFocus()
    Me.Option1.Transparent = False
    End Sub

    Private Sub Option1_LostFocus()
    Me.Option1.Transparent = True
    End Sub

    But this is not very efficient.
    Sometimes, two options are visible together.
    Do you know a more efficient way around this.?
    Attached Files Attached Files

  9. #9
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Designer Background (A2000)

    I don't know a way around that - whether the GotFocus and LostFocus events occur correctly depends very much on the way the user handles the mouse.

    Why don't you do away with the command buttons entirely? That way, the switchboard looks even more like a menu.

    If you decide to go with this, make sure to remove all references to the command buttons in the code.

  10. #10
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Designer Background (A2000)

    I really am having a bad day aren't I.

    My syntax was incorrect, causing the confusion.

    Private Sub Option1_GotFocus()
    Me.Option1.Transparent = False
    End Sub

    Private Sub Option1_LostFocus()
    Me.Option1.Transparent = True
    End Sub

    Private Sub Option2_GotFocus()
    Me.Option2.Transparent = True
    End Sub

    Private Sub Option2_LostFocus()
    Me.Option2.Transparent = False
    End Sub

    I noticed just after my post. <img src=/S/bingo.gif border=0 alt=bingo width=15 height=22>

    Have a nice day, and thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •