473,386 Members | 1,733 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Lebans textbox justification - how do you use it?

Delighted to find Lebans textbox justification but...

....after you have downloaded the sample database, with its module,
what do you do to make your own text boxes in your own database have
justified text?

I have tried copying the module out of the sample database but that,
in itself, didn't do the trick.
Nov 13 '05 #1
7 2606
Look at the source code behind the sample Reports, for example the
report named "rptClass JustifyText".

' ********START CODE
Option Compare Database
Option Explicit
Dim Justi1 As New clsJustifyText
Dim Justi2 As New clsJustifyText

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
Call Justi1.fRecordSection(Me, Me.txtTestmemo, PrintCount)
Call Justi2.fRecordSection(Me, Me.txtTestMemo2, PrintCount)
End Sub

Private Sub Report_Close()
Set Justi1 = Nothing
Set Justi2 = Nothing
End Sub

Private Sub Report_Open(Cancel As Integer)
DoCmd.Maximize
End Sub

Private Sub Report_Page()
Dim myBool As Boolean
myBool = Justi1.fJustiDirect(Me)
myBool = Justi2.fJustiDirect(Me)
'Debug.Print "SF Page event"

End Sub
' ********END CODE

You need to duplicate this code behind your own report. Make sure you go
through the user interface and select "Event Procedure" behind the
Detail section's PRINT event and the report's PAGE event.

This sample report has two TextBox controls that is justifies Text in,
named txtTestMemo and txtTestMemo2. Look at the properties for each
TextBox control.

The Font color is set to WHITE.
The ControlSource is set to the memo field named testmemo.

An alternative to all of this is to use my JustifyText ActiveX control.
The only drawback is that it does not support CanGrow/Shrink as the
JustiDirect solution does.
http://www.lebans.com/xjustifytext.htm

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Mark Thomas" <m.********@ntlworld.com> wrote in message
news:2f**************************@posting.google.c om...
Delighted to find Lebans textbox justification but...

...after you have downloaded the sample database, with its module,
what do you do to make your own text boxes in your own database have
justified text?

I have tried copying the module out of the sample database but that,
in itself, didn't do the trick.


Nov 13 '05 #2

Yes, that works. Especially after I changed the font to white - double
vision before that.

Your older ActiveX solution worked fine at home but wasn't so bright on
the network at work. Lost my date() function until I unchecked the
ActiveX - which wasn't on the network etc. I didn't want the textbox to
grow so that didn't bother me.

So it looks like the code will be the cleaner solution.

Thank you very much.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #3

Yes, that works. Especially after I changed the font to white - double
vision before that.

Your older ActiveX solution worked fine at home but wasn't so bright on
the network at work. Lost my date() function until I unchecked the
ActiveX - which wasn't on the network etc. I didn't want the textbox to
grow so that didn't bother me.

So it looks like the code will be the cleaner solution.

Thank you very much.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #4
I spoke too soon. While the code works on my home PC it will not work
on the PC/network at work.

It halts at the call for justi1, as far as I can remember.

Any ideas why?

Is it possible that there are VB libraries that need installing or some
such thing?

Mark Thomas

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #5
No, the code does not require any explicit References.

Kind of tough to diagnose the issue with the information you are
supplying.
Try running one of the report's in the sample MDB you downloaded.

FInally, ensure you have a Default printer defined for the Report.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Mark Thomas" <nosp@m> wrote in message news:41**********@127.0.0.1...
I spoke too soon. While the code works on my home PC it will not work
on the PC/network at work.

It halts at the call for justi1, as far as I can remember.

Any ideas why?

Is it possible that there are VB libraries that need installing or some such thing?

Mark Thomas

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


Nov 13 '05 #6
The downloaded sample doesn't work either.

However, our network technician has just installed the ActiveX on one of
our PCs so that I can now use that method.

Could the failure of the code to run be to do with DAO v ADO?

Mark Thomas

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #7
As I stated the first time there are no DAO dependencies or any other
external libraries required.
Again I ask, what is the error message?

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Mark Thomas" <nosp@m> wrote in message news:41**********@127.0.0.1...
The downloaded sample doesn't work either.

However, our network technician has just installed the ActiveX on one of our PCs so that I can now use that method.

Could the failure of the code to run be to do with DAO v ADO?

Mark Thomas

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


Nov 13 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Bruce Rusk | last post by:
I'm using Stephen Lebans' RTF2 control in a report, and have discovered what may be a slight bug in it. I have a lot of non-Western language (Chinese) text in my RTF field, and such records get...
5
by: Larry R Harrison Jr | last post by:
I use the Lebans calendar control and love it; the only thing is that it commonly starts out at the year 1899 rather than the current year. Is there a way to specifically tell it to start at the...
1
by: Alex | last post by:
The JustiDirect text justification on Stephen LeBans site works well but I cannot get it to work on a sub report. Could anyone tell me if this is possible. Thanks. Alex
6
by: Robert | last post by:
Hello. I have been trying out the Lebans ToolTip Classes at http://www.lebans.com/tooltip.htm, to display "balloon" style help tips in a form. The classes I am using are located at...
0
by: evilhanz | last post by:
I am using Mr. Lebans' RTF2 Control v1.4. I have managed to spell check its contents but it's a terrible kludge. Here's how I do it: 1) Put a textbox on the same form as the RTF control and...
1
by: Bob Quintal | last post by:
Hi, I have an application where I need to show detailed information about items in a dropped-down combobox. I have been studying Mr Lebans' examples called Tooltip.mdb and...
6
by: ldn95887 | last post by:
I have been using Lebans ReportToPDF code for a couple months without problems. We recently changed the format of the invoice and now the first line of the detail section of my report is missing 2...
4
by: mdarling | last post by:
I am using Lebans lady example to mix Bold and Normal in a single line text box, I have altered it and I still cant get it to bold the text I need bolded I have pasted it here, can somebody help? I...
1
by: MLH | last post by:
Was hoping to make use of AutoSizeFont\AutoSizeFontVer2.mdb procedures to auto-resize fonts in a textbox control on a report when the fixed physical size of the textbox was insufficient to display...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
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,...
0
Oralloy
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,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.