• Home
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • User/Email: Password:
  • 8:28pm
Menu
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • 8:28pm
Sister Sites
  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Options

Bookmark Thread

First Page First Unread Last Page Last Post

Print Thread

Similar Threads

RSI on 2 Moving Averages' Difference (pass Array to Function) 3 replies

required to function call function 2 replies

stop loss function and edit time function for Breakout EA 1 reply

If there is a trading platform with such function? 1 reply

There's no such thing as "plain" Mouteki 0 replies

  • Platform Tech
  • /
  • Reply to Thread
  • Subscribe
Tags: Pass ENUMs such as ALIGN_RIGHT to a function
Cancel

Pass ENUMs such as ALIGN_RIGHT to a function

  • Post #1
  • Quote
  • First Post: Aug 29, 2020 9:22am Aug 29, 2020 9:22am
  •  dawsonsg
  • | Joined Oct 2008 | Status: Member | 127 Posts
Hi Guys,

When I create an Edit Box I call a function that goes and sets a bunch of properties of that newly created Edit Box.

I want to align the text in some of the Edit Boxes to Left, some to the Right, and the rest to the CENTER.

I cant find out how to pass ENUM's for the TextAlign property. Is someone able to help?

Thanks
Steve



//---- Set all of the properties for the Edit box
void SetPropertiesEb( CEdit &object, color bg_colour, color border_colour, color text_colour, string button_text)
{
object.Font("Tahoma");
object.FontSize(8);
object.TextAlign( ALIGN_CENTER );
object.ColorBackground( bg_colour );
object.ColorBorder( border_colour );
object.Color( text_colour);
object.Text( button_text );
}
  • Post #2
  • Quote
  • Last Post: Aug 30, 2020 6:40pm Aug 30, 2020 6:40pm
  •  bam.kta
  • | Joined Aug 2020 | Status: learning to fly | 7 Posts
the TextAlign returns a boolean, check if the return value is true,
never used it , but maybe you should do it after setting the text value, (object.Text( button_text ))
 
 
  • Platform Tech
  • /
  • Pass ENUMs such as ALIGN_RIGHT to a function
  • Reply to Thread
0 traders viewing now
Top of Page
  • Facebook
  • Twitter
About FF
  • Mission
  • Products
  • User Guide
  • Media Kit
  • Blog
  • Contact
FF Products
  • Forums
  • Trades
  • Calendar
  • News
  • Market
  • Brokers
  • Trade Explorer
FF Website
  • Homepage
  • Search
  • Members
  • Report a Bug
Follow FF
  • Facebook
  • Twitter

FF Sister Sites:

  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Forex Factory® is a brand of Fair Economy, Inc.

Terms of Service / ©2023