OptionBox()
Moderator: Rathinagiri
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
OptionBox()
Είστε ευπρόσδεκτοι, Νίκος !
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
Re: OptionBox()
Hi Pablo,
I have a small improvement for your fantastic OptionBox. When the lenght of the parameter cTitle1 or cTitle2 is longer than the length of the longest parameter in the array aOptions, cTitle1 or cTitle2 is not displayed right. For example:
This can be solved by adding 2 lines of code:
Now the result is:
I included the modified version as an attachement.
Theo
I have a small improvement for your fantastic OptionBox. When the lenght of the parameter cTitle1 or cTitle2 is longer than the length of the longest parameter in the array aOptions, cTitle1 or cTitle2 is not displayed right. For example:
Code: Select all
OptionBox("Choice","This is a OptionBox with a very long string in cTitle2",{"TEST1","TEST2"}, 2)
Code: Select all
nWidth:=iif(nWidth<GetTextWidth(NIL,cTitle1,FontHandle),GetTextWidth(NIL,cTitle1,FontHandle),nWidth)
nWidth:=iif(nWidth<GetTextWidth(NIL,cTitle2,FontHandle),GetTextWidth(NIL,cTitle2,FontHandle),nWidth)
I included the modified version as an attachement.
Theo
- Attachments
-
- optionbox.zip
- (1.5 MiB) Downloaded 230 times
- serge_girard
- Posts: 3178
- Joined: Sun Nov 25, 2012 2:44 pm
- DBs Used: 1 MySQL - MariaDB
2 DBF - Location: Belgium
- Contact:
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
OptionBox()
Ohhh you are right to add this.
But you have forgotten to include in your last code:
Function OptionBox( cTitle1, cTitle2, aOptions, nDefault, cIcon )
DEFAULT cIcon := "ZZZ_AAAWINDOW" // Default HMG ICON
OptionBox_Ok(@nRet)
So here's but I would like to solve FontHandle case:
Bedankt Theo
But you have forgotten to include in your last code:
Function OptionBox( cTitle1, cTitle2, aOptions, nDefault, cIcon )
DEFAULT cIcon := "ZZZ_AAAWINDOW" // Default HMG ICON
OptionBox_Ok(@nRet)
So here's but I would like to solve FontHandle case:
Bedankt Theo
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
Re: OptionBox()
It is a pleasure working with you Pablo !
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
OptionBox()
Thank you Theo. It is also very good for me to work together.
Welkom degenen die veel van zichzelf te geven filantropische manier.
Welkom degenen die veel van zichzelf te geven filantropische manier.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein