How do I prevent a tree control from scrolling when an item is selected? I have tried handling the WM_VSCROLL message but that only works when the scroll occurs from the scroll bar. When the tree decides on its own to scroll the scroll message is not sent. How do I block this behavior? 4 1730
Hi st************* @sonic.com
Thanks for you posting in the group! How do I prevent a tree control from scrolling when an item is selected?
I noticed a tree control would scroll automatically to expend its child
nodes when it is double clicked , is it your situation?
I think the scrolling behavior is in order to make room for displaying its
new expended nodes, if you want to block this behavior, you perhaps have to
block the selected item's expanding operation.
If I misunderstand your problem, please reply this message to let me know.
Best regards,
Gary Chang
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
The problem I'm having is when I select an item with TreeView_Select Item(), there are times when I have a need for selecting an item that might be offscreen and I don't want the tree to scroll when the item becomes selected. Even when the selection doesn't trigger the tree item to expand its entries, the tree will still scroll.
Hi st************* @sonic.com,
Thanks for your quickly reply! The problem I'm having is when I select an item with
TreeView_Select Item(), there are times when I have a need for selecting an
item that might be offscreen
Does the TreeCtrl control scroll when the item you selected within the
visible field?
How about using the SetItemState method to select the item?
Best regards,
Gary Chang
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
Hi st************* @sonic.com,
Use the following code to select a treectrl item:
pmyTreeCtrl->SetItemState(H ItemTarget, TVIS_SELECTED, TVIS_SELECTED);
and to unselect an item,
pmyTreeCtrl->SetItemState(H ItemTarget, 0, TVIS_SELECTED);
Best regards,
Gary Chang
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
-------------------- This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: headware |
last post by:
I have a <select> control that contains many entries. It allows the
user to multi-select a group of them, click a button, and store the
selected data in a database. Normally they do this starting at the top
of the list moving down towards the bottom. The problem I was having
was that the <select> control was scrolling back to the top of the
page after the postback and the user would lose their place in the
<select> control forcing them to...
|
by: Nick Warrington |
last post by:
Hi all,
I am having a small problem with a tree control I am playing with.
I have created a custom tree view that displays nodes with a linktext control to the right of the nodes. When the linktext is clicked the linktext control is hidden and a combo box appears in its place that allows the
user to choose an option. Once selected, the combo is hidden and the linktext control reappears displaying the new selection.
My problem is that...
|
by: z. f. |
last post by:
Hi,
i'm using code in my aspx page.
i have data binding where i use <%# Container.DataItem("DateStart") %>
i also use code that makes a loop inside a regular
<%
%>
block
how can i pass data from the databinding to the loop that runs in a regular
|
by: David A. Osborn |
last post by:
Is there a way to maintain the highlight of an item in a tree view control?
Currently if I select another control on the screen then the item on the
tree view loses its highlight. I want to maintain the visual cue to the
user as to what is selected.
|
by: Dinsdale |
last post by:
I have an application that recieves text data via external input (i.e.
serial) and displays it on the screen (we use carraige return as a
delimiter). At this point I use a regular old text box and when the
text size gets too big I truncate the string and re-set the
TextBox.Text property. This solution is very crappy as it creates a
flickering scroll bar when I re-set the text. Scrolling is also
difficult because the position in the text...
| |
by: Kiran |
last post by:
Hello all,
I am using a tree to display stuff, and it is constantly updated, but
what I have noticed is in the lowest level, there is clearly noticable
cutoff of the text I place there. The cutoff is existent even if I do
not update the text inside the tree constantly. It seems that the text
is halfway below where it should line up. I tried placing an image to
see if that would correct it, but it does not. The image is perfectly
lined up,...
|
by: hornedw |
last post by:
I have been working on a ecommerce website for myself. What I needed
some assistance on was when i was trying to display the
categories/subcategories for the different products.
I decided to use the modified preorder tree transversal algorithm. What
I wanted was on the first page is to display the catogories as follows
Books (35)
Electronics(23)
The number inside the parenthesis being the number of products in that
|
by: Richard Maher |
last post by:
Hi,
I have this Applet-hosted Socket connection to my server and in an
ONevent/function I am retrieving all these lovely rows from the server and
inserting them into the Select-List. (The on screen appearance of the Select
List grows for the first 5 rows then the scroll bar appears if there's
more). So far so good. . .
The problem is that none of the rows I'm inserting appear on the screen
until I have RETURNed from my function; so If...
|
by: perspolis |
last post by:
Hi all
I'm looking for a Combobox that displays tree.
Does anyone has a source code for that???
thanks in advance
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |