|
Dear all,
Now I doing a thesis about industrial robot, in which I want to send data from PC to robot controller via RS232 cable, notice that robot controller is used protocol 3964R Siemens so any body know how to write a program by C++ or VC++ please show me. I had to access many website to find a communication program however, I just support for RS232 standard not for 3964R Thank for your help.
|
|
|
|
|
Hi,
How can I change the height of a dropdown/droplist combo box (not the height of the dropped listbox)? It is automatically set by the font size.
Thank you.
- NS -
|
|
|
|
|
Have a look at CComboBox::SetItemHeight .
If you want to increase dropped height, you need to increase reactangle heigh bounding it, i.e. reactangle you have mentioned while creating combobox, or use MoveWindow to mention increased height.
|
|
|
|
|
No... I mean the height of the combo box window.
- NS -
|
|
|
|
|
As mentioned in first post, you need to increase height or rest for combo box.
RECT rc;
m_comboCtrl.GetClientRect(&rc);
rc.bottom +=20;
m_comboCtrl.MoveWindow(&rc);
|
|
|
|
|
The height of the ComboBox Ctrl, that is the combo box window is fixed by the font szie. Only if the font size is changed the heigth is increased/decreased. If we call MoveWindow or SetWindowPos, only the position or width ( not height ) is changed. I tried to increase the height in the OnWindowPosChanging ( in the derived class from the CComboBox ), but failed.
Hope you got what i really want.
- NS -
|
|
|
|
|
NS17 wrote: The height of the ComboBox Ctrl, that is the combo box window is fixed by the font szie.
Do you mean item height ?
NS17 wrote: If we call MoveWindow or SetWindowPos, only the position or width ( not height ) is changed.
No, You can increase height ,too. Have you tried code sample given.
To increase item height, you need to use API mentioned in first reply.
And to increase droped height , you need to use method said in second reply.
If you are saying some thing different from this, then I'm not able to understand it.
|
|
|
|
|
prasad_som wrote: To increase item height, you need to use API mentioned in first reply.
And to increase droped height , you need to use method said in second reply.
Not both. I mean the height of the combbox itself. How will I say?
Ok... the window which contains the dropdown button. Hope you got it now...
- NS -
|
|
|
|
|
NS17 wrote: window which contains the dropdown button
Do you mean, button like control having arrow on it ?
I dont know , if it is possible. Why you needed it ?
|
|
|
|
|
prasad_som wrote: Do you mean, button
like control having arrow on it ?
Not just that button only. I need to increase/decrease the height of the combobox ctrl (includes the mentioned dropdown button)
- NS -
|
|
|
|
|
As mentioned earlier,I've no idea, if its possible.
And why you needed it ?
Browse through combo-box[^] section on CP. See , if you get any pointer.
|
|
|
|
|
OK... Thank you. This is part of customization.
- NS -
|
|
|
|
|
NS17 wrote: How will I say?
Heh, having a tough time??;P
|
|
|
|
|
M... I think CP should have a feature for specifying images. Then my need can be shown pictorially.
- NS -
|
|
|
|
|
NS17 wrote: Then my need can be shown pictorially.
just draw it
|
|
|
|
|
where?
- NS -
|
|
|
|
|
www.flikr.com ?
|
|
|
|
|
- NS -
|
|
|
|
|
in design editor, click once on the combobox to select it, then click on the combobox button to select the list height. then drop it down to adjust it
|
|
|
|
|
This is for adjusting the height of the list box, but i need to change the height of the combo box which contains the dropdown button.
- NS -
|
|
|
|
|
At design time or run time?
A combobox is comprised of two separate controls: an edit control, and a listbox. Which part are you wanting to size?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Sorry for the delay.
At run time, obviously the part of the combo box which contains the edit ctrl.
- NS -
|
|
|
|
|
As was mentioned earlier, use the SetItemHeight(-1, ...) method.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Was there message for me ? Deleted ?
Was you concerned about some code ?
|
|
|
|
|
Oops... What a fool I am!
I never think about setting index as -1. Its working fine.
Thank you very much!!!
- NS -
|
|
|
|