CListBox scroll bar not getting enabled
-
the vertical scroll bar doesnt get enabled if i add string which doesnt fit a list box. Any ideas what seems to be the problem here. Horizontal scroll bar seems to work fine.
m_lstboxMessages.AddString(sServerMsg); UpdateData(FALSE);
where m_lstboxMessages is control variable of CListBox Any suggestion regarding this?? -
the vertical scroll bar doesnt get enabled if i add string which doesnt fit a list box. Any ideas what seems to be the problem here. Horizontal scroll bar seems to work fine.
m_lstboxMessages.AddString(sServerMsg); UpdateData(FALSE);
where m_lstboxMessages is control variable of CListBox Any suggestion regarding this?? -
Make sure that the Vertical ScrollBar property of your control is enabled. You should be able to see this in the resource view.
I Dream of Absolute Zero
-
the vertical scroll bar doesnt get enabled if i add string which doesnt fit a list box. Any ideas what seems to be the problem here. Horizontal scroll bar seems to work fine.
m_lstboxMessages.AddString(sServerMsg); UpdateData(FALSE);
where m_lstboxMessages is control variable of CListBox Any suggestion regarding this??FASTian wrote: the vertical scroll bar doesnt get enabled if i add string which doesnt fit a list box. This indicates that the horizontal scroll bar is not working. The vertical scroll bar is not concerned with a string's length. It comes into play when there are more items in the control than can be displayed (e.g., the control can only show 10 strings but 15 have been added). If I am correct, it sounds like you simply need to call
SetHorizontalExtent()
in the dialog'sOnInitDialog()
method.. FASTian wrote: m_lstboxMessages.AddString(sServerMsg); UpdateData(FALSE); There is no need to (ever) callUpdataData()
.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
-
FASTian wrote: the vertical scroll bar doesnt get enabled if i add string which doesnt fit a list box. This indicates that the horizontal scroll bar is not working. The vertical scroll bar is not concerned with a string's length. It comes into play when there are more items in the control than can be displayed (e.g., the control can only show 10 strings but 15 have been added). If I am correct, it sounds like you simply need to call
SetHorizontalExtent()
in the dialog'sOnInitDialog()
method.. FASTian wrote: m_lstboxMessages.AddString(sServerMsg); UpdateData(FALSE); There is no need to (ever) callUpdataData()
.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
-
nopes thats not the case the horizontal bar shows correctly... when i add a long string. It only shows a part of the string according to the vertical height i.e it just shows only the last 10 characters or something like that...
I think I understand, but a picture is worth 1,000 words. Can you provide one?
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
-
I think I understand, but a picture is worth 1,000 words. Can you provide one?
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
-
You can't (that I know of). You'd need to upload one to your own Web site and provide a link for it here.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)