Hi guys,
I am using MS Access VBA and could download a sample TreeView which is nice. I only need to change the nods and childs alignment to right-to-left. (My Language is Persian)
I appreciate your kind help.
2 6246
I do believe that there is no way to right-align Nodes in a treeView Control. What you can do is to experiment with the Indentation Property of the TreeView Control as in: - Me![TreeView1].Indentation = 1000
Hi
Create a module and declare the following APIs -
Public Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long
-
Public Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
-
Public Declare Function InvalidateRect Lib "user32" (ByVal hwnd As Long, lpRect As Long, ByVal bErase As Long) As Long
-
Public Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
-
Declare Function GetWindow Lib "user32" (ByVal hwnd As Long, ByVal wCmd As Long) As Long
-
Public Const GW_CHILD = 5
-
Public Const WS_EX_LAYOUTRTL = &H400000
-
Public Const GWL_EXSTYLE = (-20)
-
At the form load add the mirroring effect as follows -
Private Sub Form_Load() 'On Form Load you need to set
-
Dim OldLong As Long
-
'For TreeView
-
Dim nodX As Node
-
Set nodX = TreeView1.Nodes.Add(, , "R", "Root")
-
Set nodX = TreeView1.Nodes.Add("R", tvwChild, "C1", "Child 1")
-
Set nodX = TreeView1.Nodes.Add("R", tvwChild, "C2", "Child 2")
-
Set nodX = TreeView1.Nodes.Add("R", tvwChild, "C3", "Child 3")
-
Set nodX = TreeView1.Nodes.Add("R", tvwChild, "C4", "Child 4")
-
nodX.EnsureVisible
-
OldLong = GetWindowLong(TreeView1.hwnd, GWL_EXSTYLE)
-
SetWindowLong TreeView1.hwnd, GWL_EXSTYLE, OldLong Or WS_EX_LAYOUTRTL
-
InvalidateRect hwnd, 0, False
-
End Sub
-
http://www.microsoft.com/middleeast/msdn/faq.aspx Sign in to post your reply or Sign up for a free account.
Similar topics
by: harry |
last post by:
I want to be able to change the text alignment within a table cell between
"right" & "center" depending on how many rows are in the table.
Is this possible in Javascript? - can't see how to do...
|
by: Shashi |
last post by:
Can somebody explain how the byte alignment for structures work,
taking the following example and considering:
byte of 1 Byte
word of 2 Bytes
dword of 4 Bytes
typedef struct
{
byte a;
word...
|
by: Srinivasa Raghavan |
last post by:
Hi All,
I have some doubts on the Treeview control and Form
Authentication
1) will Form Authentication work if cookies are disabled.
2) I have problem in the following code (TreeView...
|
by: Joerg Trumpfheller |
last post by:
Hey people,
how can I select a treenode with the MouseButtons.Right event if there is no
contextmenu?
I build up a treeview with 3 levels. Only if the second level is selected,
there should...
|
by: Alex D. |
last post by:
hey guys I found what is causing the problems with my treeview in
Firefox...the answer is: treeview+dropdwonlist in the same page dont work!
try this simple code and see for yourselves. you can do...
|
by: Elton Pruitt |
last post by:
The documentation on the ASP.NET 2.0 TreeView control, located at
http://msdn2.microsoft.com/en-us/k5c13faz(VS.80).aspx
says that "Node text ... can be displayed as either plain text or...
|
by: Alan T |
last post by:
I selected a node in treeview, however, if I right click another node and
after exited the pop up menu this "right clicked" node is not selected.
How do I make this "right clicked" node is selected...
|
by: dexz |
last post by:
Hi
Using the following code I defined that when Im loading the
Announcements into the program it marks the some of them with various
icons in the TreeView. This was fairly easy, because when I...
|
by: yogarajan |
last post by:
hi all
i need proper alignment
my treeview looks like
<checkbox>Fruits(parent)-134
<checkbox>Mango(child)-45
<checkbox>Orange(child)-45
...
|
by: Michael A. Covington |
last post by:
Query: Is there a simple setting that makes the WPF TreeView be connected
together by lines the way the WinForms TreeView is?
If this is not the right newsgroup for WPF, where should I be asking?...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
| |