Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

THyperGrid  3Easy , 1Medium, 1Hard

Posted on 1997-08-25
2
Medium Priority
?
273 Views
Last Modified: 2011-04-14
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
   
0
Comment
Question by:Ham
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 8

Accepted Solution

by:
ZifNab earned 300 total points
ID: 1342378
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
 
LVL 8

Expert Comment

by:ZifNab
ID: 1342379
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

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question