Hi Timo,
sorry, I am confused...
Can you please check if this is a bug? The RTL layout and text is not changed back to LTR after the first click on my button...
Even settings TextBox1.RightToLeft = 0 does not change it.
Is this my fault?
Option Explicit
Private Sub Form_Load()
Me.TextBox1.Move 0, 0, 4000, 4000
Me.TextBox1.AutoScrolling = asVertical
Me.TextBox1.ScrollBars = sbVertical
Me.TextBox1.Text = "jkasdjf öasjdfklas flökajsfl kjasölfkj aslköfjas lkjflökasdj flkasjdl öfkjaslköfj aslköjf aslökjflökasjf lkasöjf lasjöf asjdfölasj flökasjf asjflökjas lfjasl ökfj asöljf lkasdjföla sjflökjaslfökjaslkfj aslöjf lk asj dföl jaslökdfjasölkjf lkas jflasjf ljasföljas flköjaslköfj aslökfj asf jasl öjflköasjd f ölasj f ölasj fdkslf"
End Sub
Private Sub Command1_Click()
Static bRTL As Boolean
bRTL = Not bRTL
If bRTL Then
If Me.TextBox1.RightToLeft <> (rtlLayout Or rtlText) Then
Me.TextBox1.RightToLeft = (rtlLayout Or rtlText)
End If
Else
If Me.TextBox1.RightToLeft <> 0 Then
Me.TextBox1.RightToLeft = (Not rtlLayout) And (Not rtlText)
End If
End If
End Sub
TextBox RTL
Re: TextBox RTL
Or even simpler code to check (please use on button click):
If Me.TextBox1.RightToLeft = 0 Then
Me.TextBox1.RightToLeft = 3
Else
Me.TextBox1.RightToLeft = 0
End If
If Me.TextBox1.RightToLeft = 0 Then
Me.TextBox1.RightToLeft = 3
Else
Me.TextBox1.RightToLeft = 0
End If
Re: TextBox RTL
Hi,
I can reproduce this problem and am working on a fix.
TiKu
I can reproduce this problem and am working on a fix.
TiKu
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
Boycott DRM! Boycott HDCP!
Re: TextBox RTL
Thank you very much!
Re: TextBox RTL
Hi,
See the attachment.
Regards
TiKu
See the attachment.
Regards
TiKu
- Attachments
-
- editctls162148-rel.zip
- EditControls 1.6.2 pre-release
- (1.66 MiB) Downloaded 610 times
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
Boycott DRM! Boycott HDCP!
Re: TextBox RTL
Hi Timo,
thank you very much!
Do you consider this a production release?
I mean, can I use it in real life or should I do lots of beta testing?
Greetings!
thank you very much!
Do you consider this a production release?
I mean, can I use it in real life or should I do lots of beta testing?
Greetings!
Re: TextBox RTL
The fixed RightToLeft property so far is the only change compared to the last public release. Previously changing the RightToLeft property did not always recreate the control window (which also means that the control gets a new hWnd). Instead it just changed window styles in some situations. This must have been working fine on Windows XP (I developed this control on Windows XP), but obviously it did not work on Windows Vista/7. Now the control always recreates the control window.
I don't know your software, but I doubt it will have problems that are caused by this change.
I don't know your software, but I doubt it will have problems that are caused by this change.
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
Boycott DRM! Boycott HDCP!
Re: TextBox RTL
Okay, thank you very much!
Re: TextBox RTL
Hi,
For Windows Vista and 7 I've found another solution which seems to be better because it does not require to recreate the control window. Version 1.6.2.149 which I just released a few minutes ago contains this solution.
Regards
Timo
For Windows Vista and 7 I've found another solution which seems to be better because it does not require to recreate the control window. Version 1.6.2.149 which I just released a few minutes ago contains this solution.
Regards
Timo
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
Boycott DRM! Boycott HDCP!