THyperGrid 3Easy , 1Medium, 1Hard

Hello,

I am using D2.
I have found the freeware component THyperGrid v1.35 at www.neosoft.com/~pablo. It has no help documentation.

Q1a. Is there any 'DETAILED' help documentation out there?
     YES - Where do I get it?
     NO  - Can you look at the code and tell me (all - if              possible)the methods? I know how to do this at              design-time, but I would like it to change to a             response at run-time.
           eg. I would like to change text color in a cell.
           Please give example:  HyperGrid1.....
Q1b. I am using the EditMask in THyperGrid (it acts similiar      to TStringGrid), a problem I have with numbers in that      I say I want to limit a number to 4figures eg 1224          and all I want to type in is 124 => the result is           124_ (where_ is a blank against the grid margin) my         mask is '9999;1'; How do I get around this? (maybe      mask isnt the right thing to use is there something      else?)

Q1c. I am using real numbers in the THyperGrid and want to      mathematically check the values for what ever reason -      Should I use LongInt or what?

Q1d. I want to remove trailing zeros from a text string -        how?

Q1e. I want to print a string of 'random' length to a file.      The string in this case may be 3 characters long and I      want it to right justified to tab position 25.
         123456789012345678901234567890
     eg.                       645
   
HamAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ZifNabCommented:
Q1A : By my thought there is no detailed help file available.
You can find all the information of that component with the Browser (from menu View) Once you've run your program with a THyperGrid. Search for THyperGrid and you'll get more information than you want (all virtuals, published, protected, ...). (Just type in THyperGrid)

e.g. :

{Next makes the 10 Columns read-only}
for i := 0 to 9 do
     HyperGrid1.Columns[i].ReadOnly := True;
{Next puts text in a cell}
HyperGrid1.Cells[1,1] = 'Hello, world!'
{Next changes column color}
HyperGrid1.Column[1].ColumnColor := clInfoBk;

...

If this isn't what you're looking for, please clarify your problem.

Q1b. Don't know exactly, but what about Right justified the column?

Q1c. Please clarify problem. LongInt (is Type for whole numbers, like 1 2 3 4 5; and is big brother of Integer) Real is for floats (like 1.1 2.3 5.6) If you will work with floats and whole numbers, than you have to use type real or double. If you are sure that you will ONLY use whole numbers than you have to use smallInt, Integer or LongInt depending on the range. Search for Type in delphi help and you'll know what I mean.

Q1d.

var Text1 : string;
    i    : integer;

 i := 0;
 while (Text1[i]='0') and (i <> length(Text1)) do begin
  inc(i);
 end;
 Delete(Text1,0,i);

I'm sure, there are better ways to do it, look at the string-handling routines. For trimming spaces and so, you can use the trim functions.

Q1e.
const TotallengthPage = 30;

function RightJustify(Text1:string;Pos:integer):String;
var i : integer;
begin
 For i := 0 to TotalLengthPage-Pos-length(Text1) do
  Text1 := ' '+Text1;
end;

Comment : Sure, there are much better ways to do it, but I wanted to show it you in the simplest form. Hope you'll be able now to make it better yourself!

Hope I could help you with this information. If not, sorry, ask again or ask Pablo (about THyperGrid). He helped me a lot.

Have fun,
c.u. ZifNab;



0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ZifNabCommented:
Was everything clear for you?
If not, give me a comment and I'll see what I can do!

Have fun,
c.u. ZifNab;
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.