space on button

maya-chanmaya-chan Member Posts: 45
Dear Masters,

I have another prob. Sorry if always disturb all of you :(. My friend have problem with a a button. We want when we click that button must show on being a space(blank space). We have did anything to modify it but we stuck till now can't find the way. Anyone know or maybe face same problem?

Comments

  • SavatageSavatage Member Posts: 7,142
    maya-chan wrote:
    Dear Masters,

    I have another prob. Sorry if always disturb all of you :(. My friend have problem with a a button. We want when we click that button must show on being a space(blank space). We have did anything to modify it but we stuck till now can't find the way. Anyone know or maybe face same problem?

    You really need to be clearer on what you are trying to do.

    When you press a button you want to create a blank space?
    Where?
    Or are you wanting the Button Name to turn blank?

    not sure what your after.
  • maya-chanmaya-chan Member Posts: 45
    Hmm Sorry if it's not clear before. Oke this is the scenario :

    User will use some touch screen monitor or not use keyboard anymore. So we create a panel that include alphabet and some control Button such as 'C'(clear) button and space button. The problem is, on the space button when we click it didn't create any space/blank space on the textbox or display.

    I use :
    PadKeyPressed(' ');

    On Onpush session. But not work.
  • megawavezmegawavez Member Posts: 133
    Sounds like the "space" button is not configured correctly.
  • maya-chanmaya-chan Member Posts: 45
    Can you tell me more specific about 'not configure correctly'? I have tried but till now no effect. Another button success only the space button.
  • ChinmoyChinmoy Member Posts: 359
    I am not very such why something like this is required. But you can put a textbox on top of the button and in the sourceexpression as a space (' ') in the textbox property, adjust the backcolor, etc. properties of the textbox (similar to the button properties).

    Check if this works for you.

    Chn
  • maya-chanmaya-chan Member Posts: 45
    Hi Chn,

    What do you mean by put a textbox on top of the button? When the button is clicked, will appear on the textbox.
    on the panel there are 3 object :

    2 textboxes (staffid & password)
    1 group of button (Alphabet from 'A' to 'Z', Clear Button and Space Button)

    For example, user click button 'A' (we assume it is on staff id textbox), on the textbox will show 'A'. Then user click space button and click 'C' Button so on the textbox will show 'A C'.
  • ChinmoyChinmoy Member Posts: 359
    Do you want something like this? (see screenshot)

    Chn

  • MBergerMBerger Member Posts: 413
    what type of variable is the parameter for the "PadKeyPressed" function ? I suspect it is a CODE variable, so any spaces at the front are being removed, resulting in you passing nothing instead of a space.
  • maya-chanmaya-chan Member Posts: 45
    Hai Mberger,

    Yes you're right. I suspect it too, but I don't know to change it with another type as long for another button (alphabet and clear button) it's correct.
  • ChinmoyChinmoy Member Posts: 359
    Ok, I got it..

    I tried with three buttons (ButtonA,B and space) on a form, with a variable (Text1) as sourceexpression to a textbox.

    Button A - OnPush:
    Text1 := 'A'; CurrForm.UPDATE();
    Button Space - OnPush:
    Text1 := Text1 + ' '; CurrForm.UPDATE();
    Button B - OnPush:
    Text1 := Text1 + 'B'; CurrForm.UPDATE();

    It worked as desired, the text box shows the value 'A B' in my case. Is this what you are trying to do here?

    Chn
  • maya-chanmaya-chan Member Posts: 45
    Dear Chn,

    Yup, gotta. Oke i try with your trick. Thx :)
  • ChinmoyChinmoy Member Posts: 359
    Do let us know if it works.. :)

    Chn
Sign In or Register to comment.