01-02-2014 04:54 AM
HI,
I know that SetCtrlIndex doesn't work on a Textbox control.
However I have to use a Textbox to display a variable number of messages, each one representing a different warning, because of the horizontal scroll bar that is not available on a Listbox control (and some messages could be very long).
I'd like to focus the user's attention on the last of those messages, so at the end of the Textbox, but I'm not able to do this.
Anybody can help me?
Thanks
Sergio
Solved! Go to Solution.
01-02-2014 05:16 AM
Maybe this link helps
01-02-2014 06:31 AM
Thank you Wolfgang, could be a good idea, unfortunately when I show the textbox I just know the number of messages it contains, while their length can be very different.
So it isn't impossible, but it is not confortable, to count every byte of all the messages in order to locate the byte that represent the beginning of the last message.
Probably I'll let the user to act on the scroll bar in order to reach the end of textbox.
Sergio
01-02-2014 07:06 AM
Hi Wolfgang,
your suggestion has been very useful because with further investigation on SetCtrlAttribute for Textbox, I've discovered an attribute that seems to work
SetCtrlAttribute (panel, control, ATTR_FIRST_VISIBLE_LINE, lastTexboxRow);
Thanks
Sergio
01-02-2014 07:22 AM
at least indirectly, fine