NetTalk Central

Author Topic: how do buttons get their class?  (Read 4896 times)

ccordes

  • Sr. Member
  • ****
  • Posts: 384
    • View Profile
    • Email
how do buttons get their class?
« on: December 31, 2010, 10:28:02 AM »
I have some buttons on a form. 2 button fields plus the save and cancel and I need to style them properly.
At the generateform embed, I have -
  p_web.site.SaveButton.TextValue='Show Report'
  p_web.site.SaveButton.Class = 'MainButton ui-button'

at the Webserver, NetTalk Extension - Settings - Buttons - SaveButton - Class entry, I have 'MainButton ui-button'

BUT when I look at the page with Firebug, the button class is 'MainButton ui-button ui-widget ui-state-default ui-button-text-only ui-corner-left'

What am I doing wrong? I don't see anything else in the book other than what I have here.

Thanks,
Chris c
 
Real programmers use copy con newapp.exe

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: how do buttons get their class?
« Reply #1 on: January 02, 2011, 09:55:19 PM »
on the form buttons,
have you ticked on the option
"use JavaScript styling" ?

cheers
Bruce


ccordes

  • Sr. Member
  • ****
  • Posts: 384
    • View Profile
    • Email
Re: how do buttons get their class?
« Reply #2 on: January 20, 2011, 06:47:09 PM »
Thanks, Bruce.. it took a while to get back to fiddling with the buttons...
There is no setting for java script buttons when you tick on the include Save/Close button.
 
There is for the buttons that are added in the fields list.

Unless I am just not seeing it - (not much of a surprise there)

chris
Real programmers use copy con newapp.exe

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: how do buttons get their class?
« Reply #3 on: January 23, 2011, 10:31:42 PM »
Hi Chris,

The global button settings, for all the common buttons, are set in the web server procedure, Buttons tab.

I'm guessing you have "Use JavaScript Styled Button" there turned on.

The additional classes are added by the JavaScript that styles the buttons, and are, in effect, what makes the buttons look the way they do.

So the real question is - what are you really trying to do?

cheers
Bruce

ccordes

  • Sr. Member
  • ****
  • Posts: 384
    • View Profile
    • Email
Re: how do buttons get their class?
« Reply #4 on: January 24, 2011, 04:47:51 AM »
What I what is to style the buttons to not be so big and chunky.
[Edited after checking the app settings]
No, Use JavaScript styled button is not checked.
I have unchecked Use button sets for ... as well.
« Last Edit: January 24, 2011, 06:05:07 AM by ccordes »
Real programmers use copy con newapp.exe

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: how do buttons get their class?
« Reply #5 on: January 24, 2011, 06:48:02 AM »
I'm doing a Webinar on ClarionLive on the 18th of Feb, and this sort of thing will be covered then.

there's really no need to "remove" the classes that are there, you can override the properties of _those_ classes, by declaring the new property in your css file, in a class with the _same name_.

cheers
Bruce

ccordes

  • Sr. Member
  • ****
  • Posts: 384
    • View Profile
    • Email
Re: how do buttons get their class?
« Reply #6 on: January 24, 2011, 07:35:14 AM »
I would do that if I wanted everything that used those classes to be over ridden. I cases where I want only these specific buttons to look different I can't do that. So I create a button class or, in this case, just use Mainbutton and ui-button.
Real programmers use copy con newapp.exe