XE8 VCL FOR PC: How to repair the below because of fail to compile.

procedure TForm8.ComboBox1Change(Sender: TObject);
begin
if combobox1.ItemIndex = 0 then form2.sg1.DrawingStyle.gdsClassic
else if combobox1.ItemIndex = 1 then form2.sg1.DrawingStyle.gdsGradient
else if combobox1.ItemIndex = 2 then form2.sg1.DrawingStyle.gdsThemed;
form2.sg1.UpdateControlState;
end;
0
hots
7/22/2015 6:49:25 AM
embarcadero.delphi.vcl.using 2297 articles. 1 followers. Follow

6 Replies
353 Views

Similar Articles

[PageSpeed] 15

What is the (error) message that the compiler is giving you?
0
Robert
7/22/2015 7:44:14 AM
hots wally wrote:

> procedure TForm8.ComboBox1Change(Sender: TObject);
> begin
> if combobox1.ItemIndex = 0 then form2.sg1.DrawingStyle.gdsClassic
> else if combobox1.ItemIndex = 1 then
> form2.sg1.DrawingStyle.gdsGradient else if combobox1.ItemIndex = 2
> then form2.sg1.DrawingStyle.gdsThemed; form2.sg1.UpdateControlState;
> end;

Your syntax seems to be totally off. Assuming sg1 is a grid, then
DrawingStyle is a property and you can't set a property like that.
Properties are set with the assignment syntax.

Try something like:

{code}
  begin
    case comboBox1.ItemIndex of
      0: form2.sg1.DrawingStyle := gdsClassic;
      1: etc...
    end;
    form2.sg1.UpdateControlState;
  end;
{code}

-- 
Rudy Velthuis        http://www.rvelthuis.de

"Say what you will about the Ten Commandments, you must always
 come back to the pleasant fact that there are only ten of them."
 -- H. L. Mencken
0
Rudy
7/22/2015 8:15:40 AM
hots wally wrote:

> procedure TForm8.ComboBox1Change(Sender: TObject);
> begin
> if combobox1.ItemIndex = 0 then form2.sg1.DrawingStyle.gdsClassic
> else if combobox1.ItemIndex = 1 then
> form2.sg1.DrawingStyle.gdsGradient else if combobox1.ItemIndex = 2
> then form2.sg1.DrawingStyle.gdsThemed; form2.sg1.UpdateControlState;
> end;

Your syntax seems to be totally off. Assuming sg1 is a grid, then
DrawingStyle is a property and you can't set a property like that.
Properties are set with the assignment syntax.

Try something like:

{code}
  begin
    case comboBox1.ItemIndex of
      0: form2.sg1.DrawingStyle := gdsClassic;
      1: etc...
    end;
    form2.sg1.UpdateControlState;
  end;
{code}

-- 
Rudy Velthuis        http://www.rvelthuis.de

"Say what you will about the Ten Commandments, you must always
 come back to the pleasant fact that there are only ten of them."
 -- H. L. Mencken
0
Rudy
7/23/2015 5:02:50 PM
can'b be compiled.

maybe about uses setting? how to solve it?
0
hots
7/24/2015 5:10:18 AM
hots wally wrote:

> can'b be compiled.
> 
> maybe about uses setting? how to solve it?

Did you see my reply? And "Can't be compiled" is definitely not the
only error message you got.

If you want people to help you, give them all the information they
might need to help you.

-- 
Rudy Velthuis        http://www.rvelthuis.de

"Where it is a duty to worship the sun, it is pretty sure to be
 a crime to examine the laws of heat."
 -- John Morley
0
Rudy
7/24/2015 6:26:22 AM
hots wally wrote:

> can'b be compiled.
> 
> maybe about uses setting? how to solve it?

Did you see my reply? And "Can't be compiled" is definitely not the
only error message you got.

If you want people to help you, give them all the information they
might need to help you.

-- 
Rudy Velthuis        http://www.rvelthuis.de

"Where it is a duty to worship the sun, it is pretty sure to be
 a crime to examine the laws of heat."
 -- John Morley
0
Rudy
7/24/2015 6:29:48 AM
Reply:

Similar Artilces:

VCL XE8 FOR PC: HOw to renew the below to solve the fail of compile?
procedure TForm8.ComboBox1Change(Sender: TObject); begin if combobox1.ItemIndex = 0 then form2.sg1.DrawingStyle.gdsClassic else if combobox1.ItemIndex = 1 then form2.sg1.DrawingStyle.gdsGradient else if combobox1.ItemIndex = 2 then form2.sg1.DrawingStyle.gdsThemed; form2.sg1.UpdateControlState; end; thanks a lot! ...

Delphi XE8 Send Notification from Parse using VCL app
Hello, I am learning the new Baas technology with XE8. I created a small app to receive notification on Android mobiles using Parse. Everything is working fine when the notification message is sent from Parse web site. However when my VCL app send the notification with BackendPush component, nothing is coming in mobile phone. The messages are sending correctly because I can see them on Parse site. Their status is different than the one sent from Parse . Here are my VCL messages Status on Parse: Type: API, target: Chanels. When sent on Parse site: Type : Campaign, Target: Everyone...

Spreadsheet component for use in Delphi VCL 2010
Good day I have been using the Flexcel component for reading and writing Excel spreadsheets in my Delphi VCL projects for some while and have been very happy. Unfortunately, though, a version for use with Excel 2007 format files (.XLSX) has been promised for years now but just never arrives and I have reached a stage where I just have to update some of my software. Can any body suggest alternatives and comment on their experience with these? I have no objection to buying a component although all my programs are for academic use by myself and colleagues/friends so cheaper would...

Actuall thread about vcl classes / components in C++ for use with delphi...
Hi All, I wanted to follow the topic that appears as a 'sub-thread' above... suspecting it would die... I'm sure many of us are interested in this topic. ( by 'sure' I mean absolutely certain...) It also brings to my mind the question, does anyone know of any references for us semi-delphi-literate C++ programmers that would like to read/write/modify delphi stuff? Thanks Everyone, (you know who you are... B) Bruce ...

Which VCL to use
Hello guys, May i know what VCL Components avaiable to do the following task I'me having advertisement magazine published every week. We publish text and image advertisement. We use Adobe InDeisign to design the pages in the magazine. Now we need to make software to reduce the time in designing. My magazine page size is 30 x 100 cm. We are going to make a software that will take details of advertisements from the user and align on the page. And with one click of a button the program gives output in pdf, jpg or whatever format. The program should automatically adjust the a...

Delphi IS the VCL
Delphi IS the VCL! Oh, wait... sorry. I meant Winforms, not VCL. What was I thinking? I know! they got me too. Don't know what I was thinking. :) > {quote:title=Jay Faubion wrote:}{quote} > Delphi IS the VCL! > > Oh, wait... sorry. I meant Winforms, not VCL. > > What was I thinking? Jay Faubion wrote: > Delphi IS the VCL! > TButton Forever! ;-) W Jay Faubion wrote: > What was I thinking? Wasn't it called CLX ? Turbo Vision -> OWL -> VCL -> CLX -> Winforms -> ...... (to be continued) -- ...

Delphi 6
In preparation for applying a bug fix to one of the VCL modules (AxCtrls.pas), I have been trying to compile the original source code for the module in order to reproduce exactly the existing dcu. I have copied AxCtrls.pas to an empty directory, and have found that doing: dcc32 -q AxCtrls -$D- -$L- gives me a dcu which is identical in size to the one on Delphi6/Lib, with identical contents except for a few bytes near the beginning, which I assume are a compliation timestamp. However, I have been unsuccessful in duplicating the debug dcu in Delphi6/Lib/Debug. Using "-$D+ -$L+&q...

XE8 VCL FOR PC(win7): a warning window occur when I open the project
Hi, I want open the project and I don't expect a security window occurs when I open it, how can I do with the code? Seems about UAC? I expect I open the projcet automatically using the Administrator privileges, and the warning form disappear. thanks a lot! hots wrote: > I want open the project and I don't expect a security window > occurs when I open it, how can I do with the code? What so you mean? > I expect I open the projcet automatically using the Administrator > privileges, and the warning form disappear. That would be true only if you are running...

Ann: ESBPCS for VCL v6.6.0
*ESBCS for VCL v6.6* is now available - and this includes support for the just released Delphi XE8 :) This is a free upgrade for existing customers. If you don't own a copy, go to the site and grab a trial version - ESBPCS for VCL supplies a huge collection of Components and Routines aimed at making Data Entry and Manipulation easier for the Developer and their customers. http://www.esbconsult.com/esbpcs Also the subsets: *ESBPCS-Lite for VCL*, *ESBPCS-Calcs for VCL*, *ESBPCS-Dates for VCL* and *ESBPCS-Stats for VCL* have been updated. -- Glenn Crouch mailto:glenn@esbconsult.c...

dll fails when compiled with delphi 2010, but works with delphi 7
I may be doing good if someone can just point me to the right forum I have not created a dll for some time and have not written one with 2010 before. The dll I am creating will be called as a cfx function by either a ColdFusion or BlueDragon webserver. I have written cfx DLLs in the past. The function declaration is below, it is the standard declaration from ColdFusion or Bluegradon documention on creating a CFX. procedure ProcessTagRequest(Request: TCFXRequest); export; cdecl; Since this was the first time using 2010 I wrote a very basic function to build off that was not much mor...

Attempting to compile Delphi 5 code in Delphi XE5 is failing
Greetings All, If I'm not in the correct formum please tell me which one I should be in. Just upgraded to Delphi XE5 and am attempting to compile one of my Delphi 5 projects. I used Interbase Express I use either TDataSource -> TCDSProvider -> TDataSetProvider -> TIBQuery or TDataSource -> TClientDataSet -> TDataSetProvider -> TIBQuery Also used TIBDatabase, TIBTransaction, and TIBStoredProc I open the smallest project I have and click compile and almost immediately I receive this error Checking project dependencies... Compiling CITranEngine.dproj...

Profiler for Delphi VCL
Hello, i still use D7 :-)) i have a big application with a lot of forms and on some forms are hundreds of objects. The forms are loaded at runtime when they will be needed the first time. One of this big forms needed normaly around 3 seconds to open, suddenly it needs more than 20 seconds. Other (also big) forms in this app are still as fast as always. I can't find out what had changed, because this time is used between the Application.CreateForm() call and the entry in the create-event of the created form. Any ideas how i can find out what wastes the time? I think i need some...

Newly installed VCL does not show up on VCL menu
Hello, I obtained the source code for a VCL from the vendor and build a bpl using it. I compiled the code and then clicked the install button on the pull down menu. It said that it installed, and it shows up on the menu of the install packages box, however it is no where to be found on the VCL menu to the right side on the IDE of Delphi XE. What have I done wrong? Thank you for any help you can provide. John Shyer John wrote: > I obtained the source code for a VCL from the vendor and build > a bpl using it. I compiled the code and then clicked the install > bu...

VCL initialization sequence for a non-VCL executable
Hi all, I've tried the new Application Appearance feature, very cool to use. As I see, the only effect id to add change the application .cpp file to manage the line TStyleManager::TrySetStyle("Luna"); This is working fine when using an exe create for a project type "VCL Form Application - Cpp Builder". But, it's not working When using an exe created another IDE. When I try to use the line mentioned above, I get the error message "Style "Luna" not found". What should be done / called so it still works, in ...

Web resources about - XE8 VCL FOR PC: How to repair the below because of fail to compile. - embarcadero.delphi.vcl.using

Apple, Microsoft, Samsung And Other Tech Firms Implicated In Child Labor Report
Apple, Samsung and Microsoft are among a host of tech companies and carmakers implicated in a new report that sheds light on apparent child labor ...

Eggs, Sausages, Bernie Sanders, and the Jewish Question
AP Photo/Brynn Anderson Democratic presidential candidate, Senator Bernie Sanders speaks to a crowded room during a campaign stopMonday, January ...

Will Smith's 'Fresh Prince' Co-Star Janet Hubert Slams Jada Pinkett-Smith's Oscars Boycott
Janet Hubert , who played Will Smith ‘s Aunt Vivian on Fresh Prince of Bel-Air , is slamming Jada Pinkett-Smith for her 2016 Oscars boycott . ...

Tuesday Morning News: SCOTUS, Bill Maher, Apple, Glenn Frey, Snowstorm, Zinnia, Frat Branding
SUPREME COURT : SCOTUS grants United States vs. Texas , the Obama administration’s appeal regarding its immigration polic y: “The court will ...

Warning of 'great challenges' this year, IMF cuts world economic growth forecast
Warning of "great challenges" this year for the world economy, the International Monetary Fund on Tuesday downgraded its forecast for global ...

The Star Wars Game I've Played Every Day For Three Months Straight
This is the opening screen for Star Wars: Galaxy of Heroes . It’s a game I called “another f**king mobile Star Wars card game” when it was announced ...

Amy Schumer's Boyfriend Ben Hanisch: 'I'm In Love With Her'
Amy Schumer ‘s boyfriend, furniture designer Ben Hanisch , wrote a super sweet message about her on his Instagram account! First, they snapped ...

Michael Moore: How racism poisoned Flint’s water, by @Gaius_Publius
Michael Moore: How racism poisoned Flint’s water by Gaius Publius Flint water — a weapon of mass destruction (not a metaphor). Source . I'm ...

‘Pee-Wee’s Big Holiday’ Gets Netflix Premiere Date, First Teaser Trailer
Mark your Netflix-centric calendars: “Pee-Wee’s Big Holiday” will premiere on March 18, 2016. The new film stars the beloved fun-loving hero ...

'American Pie' singer Don McLean charged in Camden with domestic violence
Press Herald 'American Pie' singer Don McLean charged in Camden with domestic violence Press Herald McLean, 70, was arrested at his home early ...

Resources last updated: 1/19/2016 4:59:34 PM