想使C++builder中TMemo控件中的滚动条置顶,而不是出于位于最底端。
2个回答
展开全部
可以读入数据后,发个消息即可。
mmo1->Perform(WM_VSCROLL,SB_TOP,0);
mmo1->Perform(WM_VSCROLL,SB_LINEUP,0);//向上滚动
mmo1->Perform(WM_VSCROLL,SB_LINEDOWN,0);向下滚动
mmo1->Perform(WM_VSCROLL,SB_TOP,0);
mmo1->Perform(WM_VSCROLL,SB_LINEUP,0);//向上滚动
mmo1->Perform(WM_VSCROLL,SB_LINEDOWN,0);向下滚动
追问
谢谢了,就是进行发消息机制。下边分别是memo、scrollbox滚动条移动机制。
SendMessage(Memo1-> Handle, WM_VSCROLL, SB_BOTTOM, NULL);
SendMessage(Memo1-> Handle,WM_VSCROLL,SB_TOP,NULL);
SendMessage(ScrollBox1->Handle,WM_VSCROLL,SB_LINERIGHT,0);
SendMessage(ScrollBox1->Handle,WM_HSCROLL,SB_LINERIGHT,0);
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询