Underscores in Control Titles

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Underscores in Control Titles

Werner-4
Hello,

using Gambas 1.0.10 on SuSE 9.3.
it seems Gambas inserts an underscore to control titles, chosen in a way
that each control is using a different character. Clicking a control can
then be emulated on the keyboard by typing the equivalent ALT+character
combination.

Is there a way to turn this off?

Thanks,

Werner Dahn



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Underscores in Control Titles

A Person
Good Day . . .

Your problem is a 'feature' in KDE. To my knowledge the problem cannot
be resolved with KDE or Gambas. KDE told me through a bug report that it
was a feature. It can be modified but it is a source code problem. Far
above my head!

Your project gets these ampersands by using a component called
gb.qt.kde. Remove this and the ampersands go away. Unless like me you
have a project that uses the DatePicker or other KDE control then you
put up with them.

Hope this helps.

Paul


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Re: Underscores in Control Titles

Laurent Carlier
A Person a écrit :

>
> Your project gets these ampersands by using a component called
> gb.qt.kde. Remove this and the ampersands go away. Unless like me you
> have a project that uses the DatePicker or other KDE control then you
> put up with them.
>
> Hope this helps.
>
> Paul
>

Does double ampersand solve the prob ? ( && )

--

Laurent Carlier
jabber : [hidden email]



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Underscores in Control Titles

A Person
In reply to this post by Werner-4
Good Day . . .

Two ampersands do not work. I tried everything possible over a couple of
months. The KDE ampersand function has a higher priority than Gambas so
it overrides any Gambas choices. (my guess).

I had limited success with graphics. Special characters such as '<' and
'<<' do not generate ampersands in KDE 3.4.2 although they did in an
earlier version or maybe it is the newer Gambas. I tried spaces before
and after. I tried quotation marks. I tried using raised labels instead
of buttons. I tried . . .

I could not find a way around the 'feature' other than removing the
earlier mentioned component. This is not really a problem unless you
want to use a KDE control such as DatePicker.

This has cancelled one of my projects. I was writing a Bingo program
that had 150 buttons. It is totally ridiculous to have the underscore
show up randomly across the form.

I want to try REALbasic when it evolves into a workable environment just
to get around this problem (and none graphical indexed controls).

Hope this helps.

Paul


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Re: Underscores in Control Titles

Werner-4
In reply to this post by A Person
A Person wrote:

> Good Day . . .
>
> Your problem is a 'feature' in KDE. To my knowledge the problem cannot
> be resolved with KDE or Gambas. KDE told me through a bug report that
> it was a feature. It can be modified but it is a source code problem.
> Far above my head!
>
> Your project gets these ampersands by using a component called
> gb.qt.kde. Remove this and the ampersands go away. Unless like me you
> have a project that uses the DatePicker or other KDE control then you
> put up with them.
>
> Hope this helps.
>
> Paul
>
removing the KDE component from the project did the trick! Thank you
very much!

Best Regards,

Werner Dahn



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Re: Underscores in Control Titles

Benoît Minisini
In reply to this post by A Person
On Thursday 15 September 2005 04:35, A Person wrote:

> Good Day . . .
>
> Two ampersands do not work. I tried everything possible over a couple of
> months. The KDE ampersand function has a higher priority than Gambas so
> it overrides any Gambas choices. (my guess).
>
> I had limited success with graphics. Special characters such as '<' and
> '<<' do not generate ampersands in KDE 3.4.2 although they did in an
> earlier version or maybe it is the newer Gambas. I tried spaces before
> and after. I tried quotation marks. I tried using raised labels instead
> of buttons. I tried . . .
>
> I could not find a way around the 'feature' other than removing the
> earlier mentioned component. This is not really a problem unless you
> want to use a KDE control such as DatePicker.
>
> This has cancelled one of my projects. I was writing a Bingo program
> that had 150 buttons. It is totally ridiculous to have the underscore
> show up randomly across the form.

Why don't you write your own button class? It is not very complicated: you can
use a DrawingArea with a border, the mouse events, and draw what you want
inside.

>
> I want to try REALbasic when it evolves into a workable environment just
> to get around this problem (and none graphical indexed controls).
>
> Hope this helps.
>
> Paul
>

Regards,

--
Benoit Minisini
mailto:[hidden email]


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Saving multiple variables

Scott-2-2
In reply to this post by A Person
Hi,

    I am writing a simple strategy game and I would like to have a
save/load feature.  I have been reading up on file.save and file.load
and it looks like I can only save a single variable using that.  The
problem is I need to save a small list of variables and would like to
save all of them to the same file, how would I do this?

    I am using version 1.9.20 of GamBas, thanks

--
Your friend,
Scott

http://www.bmts.com



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Saving multiple variables

Rob Kudla
On Sun September 25 2005 10:59, Scott wrote:
> that.  The problem is I need to save a small list of variables and
> would like to save all of them to the same file, how would I do
> this?

File.Save("filename.txt", var1 & "\n" & var2 & "\n" & var3)

I mean, use whatever delimiter you like, it's just a matter of putting
all the variables into one string.

Rob



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Saving multiple variables

Scott-2-2
Rob Kudla wrote:
> File.Save("filename.txt", var1 & "\n" & var2 & "\n" & var3)
>
> I mean, use whatever delimiter you like, it's just a matter of putting
> all the variables into one string.
>  
Thank you.  I apologize for my ignorance, before using Gambas I only
knew how to program a bit in Qbasic, but how do I load and split up the
variables to be used in the program?

--
Your friend,
Scott

http://www.bmts.com



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Saving multiple variables

Rob Kudla
On Sun September 25 2005 12:27, Scott wrote:
> Thank you.  I apologize for my ignorance, before using Gambas I
> only knew how to program a bit in Qbasic, but how do I load and
> split up the variables to be used in the program?

dim arr as new String[]

arr = Split(File.Load(filename.txt), "\n")
var1 = arr[0]
var2 = arr[1]
var3 = arr[2]

You could, of course, do both the save and the load almost the same
way you did it in Qbasic, with OPEN and PRINT# and LINE INPUT# and
CLOSE, but I think this syntax is a lot easier to type.

Rob



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Saving multiple variables

Scott-2-2
Rob Kudla wrote:
On Sun September 25 2005 12:27, Scott wrote:
  
dim arr as new String[]

arr = Split(File.Load(filename.txt), "\n")
var1 = arr[0]
var2 = arr[1]
var3 = arr[2]
  
Thank you very much!  That works perfectly.
but I think this syntax is a lot easier to type.
  
True, I like easier :)
-- 
Your friend,
Scott

http://www.bmts.com
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Saving multiple variables

Scott-2-2
Scott wrote:
Thank you very much!  That works perfectly.
When I tested it it worked perfectly, but now when I try to implement this into my game I get this weird error, "unknown symbol 'save' in class 'menu'".  Am i doing something wrong or did I find a bug in v1.9.20?  Below I have placed the code that I am using for the save.

PUBLIC SUB Save_Click()

DIM destination AS String
    Dialog.Title = "Please select a name to save"
    Dialog.Filter = ["OpenHotels Save Game (*.save)"]
    IF NOT Dialog.SaveFile() THEN
        destination = Dialog.Path
        file.Save(destination, mstart.funds & "\n" & mstart.rooms & "\n" & mstart.status & "\n" & mstart.guest & "\n" & mstart.visibility & "\n" & mstart.wk & "\n" & mstart.yr & "\n" & mstart.totalmarket & "\n" & mstart.cp1 & "\n" & mstart.cp2 & "\n" & mstart.cp3 & "\n" & mstart.cp4 & "\n" & mstart.cp1funds & "\n" & mstart.cp2funds & "\n" & mstart.cp3funds & "\n" & mstart.cp4funds & "\n" & mstart.cp1rooms & "\n" & mstart.cp2rooms & "\n" & mstart.cp3rooms & "\n" & mstart.cp4rooms & "\n" & mstart.cp1status & "\n" & mstart.cp2status & "\n" & mstart.cp3status & "\n" & mstart.cp4status & "\n" & mstart.cp1guest)
    END IF
END

-- 
Your friend,
Scott

http://www.bmts.com
Loading...