ScrollBar Width...

mfaisal.ce

Member
Local time
Today, 06:45
Joined
Dec 21, 2020
Messages
76
Hello Freinds,

1. I want to change scroll bar width in subform view.... plz tell me how can i do that?

2. Combobox dropdown, only show when i click on it else it shows as text box... how can i do that?

regards,
 
1. AFAIK you can't. You can switch it off but the width is fixed at 255 Twips where 1cm = 568 twips

2. Use the dropdown property in code: Me.Comboname.Dropdown
 
1. AFAIK you can't. You can switch it off but the width is fixed at 255 Twips where 1cm = 568 twips

2. Use the dropdown property in code: Me.Comboname.Dropdown
1. It means that there is no way to decrease the width of scrollbar....
2.u didn't get mypoint about combobox.... I have a bound combobox but i need to look it as a textbox but when i click on it, it gives me dropdown option to select value.....
 
I have a bound combobox but i need to look it as a textbox but when i click on it, it gives me dropdown option to select value.....

so are you saying you don't want to see the down arrow on a combo box, and you want the dropdown to appear without a scrollbar when the user clicks on the control?

perhaps attach some images to illustrate what you are trying to achieve. You can always construct your own 'combo' using a combination of textbox and listbox or subform
 
I have a bound combobox but i need to look it as a textbox but when i click on it, it gives me dropdown option to select value.....

It may be that you haven't set the combo box properties correctly, and it's not quite showing the data in the way you want to see. It's quite a strange request - so is it connected with the way the the combobox displays the contents?
 
Yes bro u r right.... How it can be possible
so are you saying you don't want to see the down arrow on a combo box, and you want the dropdown to appear without a scrollbar when the user clicks on the control?

perhaps attach some images to illustrate what you are trying to achieve. You can always construct your own 'combo' using a combination of textbo
 
1. The problem with scroll bar width is that it is a registry element.


The fourth post in the referenced thread describes the process. NOTE, however, that (a) it would be system-wide (all or nothing at all) and (b) will require a reboot any time you want to change it. I cannot guarantee you that it would "stick" with the width you select either. Patching or a Windows Repair might easily reset it.

2. If it is a combo box, it is going to have a "down-arrow" element. That is the nature of the combo box. I searched for ways to control the visible features of the combo box but after a few minutes of searching several potential key phrases, ... no joy. That down-arrow is there to stay. AND if you try to control it by changing the width of the combo box, the arrow stays visible but the data display area shrinks. In theory, if you were REALLY good as a programmer and could get some guidelines from the C++ crowd, you could build your own control - but I'll bet its events wouldn't be quite right.
 
See demo on how to do what you want. This cannot be done on a continuous form without a lot more code.
 

Attachments

so are you saying you don't want to see the down arrow on a combo box, and you want the dropdown to appear without a scrollbar when the user clicks on the control?

perhaps attach some images to illustrate what you are trying to achieve. You can always construct your own 'combo' using a combination of textbox and listbox or subform
Plz see the attached image for reference....

I need scrollbar width to be reduced...

i need combobox dropdown menu to be shown only on focus, else hide it....
 

Attachments

  • Image.jpg
    Image.jpg
    84.3 KB · Views: 289
As already stated you can't reduce the scrollbar width. That's a non starter.

Nor can you hide the combo drop down arrow.
However, you could overlay the combo with a textbox of the same width. When you click on the textbox, use code to set focus on the combo underneath then hide the textbox.
Or...forget about this and just use a smaller or narrower font to fit more in the space available
Or..use the alternative suggested by MajP with a textbox and a listbox underneath that only appears when the textbox is clicked
 
As already stated you can't reduce the scrollbar width. That's a non starter.

Nor can you hide the combo drop down arrow.
However, you could overlay the combo with a textbox of the same width. When you click on the textbox, use code to set focus on the combo underneath then hide the textbox.
Or...forget about this and just use a smaller or narrower font to fit more in the space available
Or..use the alternative suggested by MajP with a textbox and a listbox underneath that only appears when the textbox is clicked
thanks all dear.....
 
i need combobox dropdown menu to be shown only on focus, else hide it.
That is much easier to do. You were not very clear in the beginning
dropdown2.jpg

I have this on the keydown, but you can do this on the focus event instead. Here is all the code you need
Code:
Private Sub txtColor_KeyDown(KeyCode As Integer, Shift As Integer)
  Me.cmboColor.SetFocus
  Me.cmboColor.Dropdown
End Sub

FYI,
This trick of hiding a bound combo behind a bound textbox is the same way you do cascading combos on a continuous form. Also I forgot to set the tabstop on the combo to "No". You should do that if tabbing.
 

Attachments

Last edited:
I don't mean to be awkward, but I assume you are new to using Access, based on your post count. If so, I think you will have your hands full getting to grips with database development, rather than worrying about a tiny detail that I assume has never bothered anyone.
 
In the example you posted the drop down width is the same width as on the form. I don't know if that was by intention or not. The drop down display width on the form doesn't have to be as be wide as the drop down expansion, (and the expansion can have more columns of information), so you could just make your display narrower, and save some space that way. Unless you have some long options in the list, it seems much wider than it needs to be. A user can also press shift-F2 to zoom the visible value of the combo box (or any control, come to that) , so there's other ways to reduce the width of the combo box. You could even code this zoom/expand behaviour into the combo box double click event (for instance).

One problem with changing the appearance of a combo box is that experienced users might not expect combo box behaviour from a control that doesn't look like a combo box, and may assume it's just a free text field as a result.

You may not have realised there were alternatives. The expand arrow is about 2 or 3 characters width at most. It hardly seems worthwhile spending a load of time on this, but it's your baby, and there's a few alternatives above.
 
2 more things that haven't been mentioned so far AFAIK
You could also remove the record selectors on the left as they are taking up space.
And of course you could also increase the form width

But frankly I also think this isn't important enough to spend much time dealing with alternative approaches
 
FYI,
This trick of hiding a bound combo behind a bound textbox is the same way you do cascading combos on a continuous form. Also I forgot to set the tabstop on the combo to "No". You should do that if tabbing.
Hey @MajP, this is my curiosity and not a specific issue, so I didn't want to make a new thread--but can you elaborate on this "cascading combos" concept? If you have a demo database I'd love to take a peek.
 
Hey @MajP, this is my curiosity and not a specific issue, so I didn't want to make a new thread--but can you elaborate on this "cascading combos" concept? If you have a demo database I'd love to take a peek.
PMFJI.
I have an example database with 5 cascading combo boxes where the info shown in each depends on what is selected in the previous combo.
Cascading Combo Boxes - Mendip Data Systems
 

Users who are viewing this thread

Back
Top Bottom