changing font at run time

hello,

 I need to change the font type and size of reports depending on the user
input. I need some suggestions....Now i am trying as follows.

i am using datawindowobject.modify("objectname.font.height=xx")
this is working..
 to get all available objects in a datawindow ...
Using describe(datawindow.objects) i got all objects in a string..

Is there any way to get the number of objects  and get the name one by one
..(so that i can put in a loop and change it)

any other suggestions also welcome

thanks
bal






0
Balu
5/24/2001 9:05:21 PM
sybase.powerbuilder.datawindow 28057 articles. 4 followers. Follow

2 Replies
622 Views

Similar Articles

[PageSpeed] 41

A function we had since 3.0. Just import it. (Export is from 7.0)

$PBExportHeader$f_dw_get_objects.srf
$PBExportComments$Returns requested objects on a datawindow.
global type f_dw_get_objects from function_object
end type

forward prototypes
global function integer f_dw_get_objects (datawindow dw_arg, ref string
obj_list[], string obj_type, string band)
end prototypes

global function integer f_dw_get_objects (datawindow dw_arg, ref string
obj_list[], string obj_type, string
band);//////////////////////////////////////////////////////////////////////
//
//
//  Function:  F_Dw_Get_Objects
//   Purpose:  The following function will parse the list of objects
//       contained in the dataobject associated with a
//       datawindow control, returning their names into a string
//       array passed by reference, and returning the number of
//       names in the array as the return value of the function.
//
//       You can control the objects returned by type and by
//       band.  Specifying an "*" for either type or band means
//       that you want all occurences of objects across type or
//       band.  For information on valid band and object type
//       names ( See the PowerBuilder's Advanced Datawindows
//          Manual. ).
//
//       Note:  if this function will be used against columns,
//        all of your columns must have names!!
//
//      Example1: This will return the names of all text objects
//              in the header band of dw_1 into mylist,
//          and the number of names returned into obj_num.
//
//              obj_num = f_parse_obj_string(dw_1,mylist, &
//             "text","header")
//
//      Example2: This will return the names of all column objects
//          in dw_1 into mylist, and the number of names
//          returned into obj_num.
//
//          obj_num = f_parse_obj_string(dw_1,mylist, &
//             "column","*")
//
//      Example3: This will return the names of all objects in
//          the summary band of dw_1 into mylist, and the
//          number of names returned into obj_num.
//
//          obj_num = f_parse_obj_string(dw_1,mylist, &
//              "*","summary")
//
//      Example4: This will return the names of all objects in
//          dw_1  into mylist, and the number of names
//          returned into obj_num.
//
//          obj_num = f_parse_obj_string(dw_1,mylist, &
//            "*","*")
//
//      ARGUMENTS:
//      dw_arg  datawindow control passed by value
//      obj_list  string array passed by reference
//      obj_type  a string passed by value
//      band      a string passed by value
//
//      Log:
//
//   Who    When    What
//-----------------------------------------------------------------------
//   Powersoft        initial version
//
//////////////////////////////////////////////////////////////////////////

string obj_string, obj_holder
int obj_count, start_pos=1, tab_pos, count = 0

obj_string = Describe(dw_arg,"datawindow.objects")
tab_pos =  Pos(obj_string,"~t",start_pos)
DO WHILE tab_pos > 0
 obj_holder = Mid(obj_string,start_pos,(tab_pos - start_pos))
 IF (describe(dw_arg,obj_holder+".type") = obj_type or obj_type = "*") AND &
  (Describe(dw_arg,obj_holder+".band") = band or band = "*") THEN
   count = count + 1
   obj_list[count] = obj_holder
 END IF
 start_pos = tab_pos + 1
 tab_pos =  Pos(obj_string,"~t",start_pos)
LOOP
obj_holder = Mid(obj_string,start_pos,Len(obj_string))
IF (Describe(dw_arg,obj_holder+".type") = obj_type or obj_type = "*") AND &
 (Describe(dw_arg,obj_holder+".band") = band or band = "*") THEN
 count = count + 1
 obj_list[count] = obj_holder
END IF
Return count


end function


--
SRLoka
"Balu" <balaji_menon@yahoo.com> wrote in message
news:qbaMugJ5AHA.256@forums.sybase.com...
> hello,
>
>  I need to change the font type and size of reports depending on the user
> input. I need some suggestions....Now i am trying as follows.
>
> i am using datawindowobject.modify("objectname.font.height=xx")
> this is working..
>  to get all available objects in a datawindow ...
> Using describe(datawindow.objects) i got all objects in a string..
>
> Is there any way to get the number of objects  and get the name one by one
> .(so that i can put in a loop and change it)
>
> any other suggestions also welcome
>
> thanks
> bal
>
>
>
>
>
>


0
Srinivas
5/25/2001 1:45:48 PM
THANKS..
I wrote a similar function..

Now the prooblem is with nested reports..
.....
.....
   ls_Column_Type = dw_1.describe(ls_dwcolumn + ".type")
   If Lower(ls_Column_Type) = "report" then
       ls_report_name = dw_1.Describe(ls_dwcolumn + ".name")
       ll_result = dw_1.GetChild( ls_report_name, ldw_nested) //
   If ll_result > 0 then
......

getchild() works for composite reports but not for nested reports.(it is
there in PB help !!)

so any other solution for this...


thanks
bal


0
Balu
5/25/2001 5:06:11 PM
Reply:

Similar Artilces:

How to change the font in menus at run time?
Hi, How to change the popup or MDI menu item's font at run time in PB, So that the multilanguage feature can be achieved. TIA AFAIK, it can't be done solely within your app. There's a registry setting for it, but it uses a long binary value to specify the font and size. And changing that value will affect EVERY menu on your system. Plus, you have to find a way to get Windows to refresh the display before the change will take effect. If you really want to go through all of that, let me know and I'll find the registry key for you. "Ewak" <...

How to change the font in menus at run time?
Hi, How to change the popup or MDI menu item's font at run time in PB, So that the multilanguage feature can be achieved. TIA Sorry for wrong posting ...

Changing N-Up datawindow at run time
I have an N-Up datawindow which I would like to change at runtime. Specifically I would like to change the Datawindow.Rows_Per_Detail property to match the number of rows retrieved, then duplicate the column and text objects for each row. According to the PB help, Modify cannot change this property. SyntaxFromSQL can, but it does not allow you to create the N-Up presentation style. I have seen a couple of PBDJ articles that suggest this is possible, but I can't see how to do it. I've tried using dot notation, Modify, and SyntaxFromSQL (with style(type=N-Up)), but I get e...

PowerBuilder 6 changes printed datawindow font
We recently migrated an application from PowerBuilder 5 to PowerBuilder 6. One of the datawindows has fields using the Microsoft Sans Serif 8 font. When printed, the font is different on two of the same HP printers. Both of the printers printed exactly the same way when the application was in PowerBuilder 5. Also, the verticle field spacing has changed from PowerBuilder 5 to PowerBuilder 6. Has anybody had these results? Does the 6.0.01 patch (currently in beta) fix this? Brian Valerie, A change to the way PBU's are calculated was made to PB6. The end result is that PB...

Problem with DataWindow Size Change at Run-Time
I've noticed that the size of DataWindows is larger at run-time than at design time. At design time, I align several DataWindows together nicely in a form, but when I run my application with the form, all DataWindows grow in size and they don't fit in the form anymore. Any ideas? I'm using Optima++ 1.5. Ying Xie ...

How to change the tool tip font at run time?
Hi, I want to change the tooltip's font at run time based on the user login and display the tooltip text from the tag property. ie., When a user logged in, the tool tip text will be read from .ini file (Seperate .ini file will be maintained for each language.) based on the user's language and set the tool tip text in the tag property which is displayed as tool tip text. I used the API Calls to display the tool tip. But how to change the tooltip font at run time. TIA The font is stored in the registry as some magical binary value. You'll have to use API c...

How to change a column Style at running time for datawindow
I have a datawindown with a couple of columns on it. I would like to display one of column in a different Style under different situation. e.g. I want column A to display in a DropDownDW Style when user click on "Browse" button, and I want column A to display in a Edit Style when user click on "Insert" button. I really appreciate if you can show me how? ...

Problem with DataWindow Size Change at Run-Time
I've noticed that the size of DataWindows is larger at run-time than at design time. At design time, I align several DataWindows together nicely in a form, but when I run my application with the form, all DataWindows grow in size and they don't fit in the form anymore. Any ideas? I'm using Optima++ 1.5. Ying Xie ...

How to change a column Style at running time for datawindow
I have a datawindown with a couple of columns on it. I would like to display one of column in a different Style under different situation. e.g. I want column A to display in a DropDownDW Style when user click on "Browse" button, and I want column A to display in a Edit Style when user click on "Insert" button. I really appreciate if you can show me how? ...

Changing Font Style of List Item At run time
Dim li As New ListItem For Each li In chklstSubService.Items If ObjDR("subservicetype") = 0 Then li.Text--------------- ?????? End If I want to make the text bold at run timeRegardsSarikasarika How about this: Dim li As New ListItem For Each li In chklstSubService.Items If ObjDR("subservicetype") = 0 Then li.Text = "<b>" & li.Text & "</b>" End If Dirty, but it works..! HiTry if this works Dim li As New ListItemFor Each li In chklstSubService.ItemsIf ObjDR("subservicetype") = 0 Thenli.Attributes.CssStyle.Add("font-weight", "bold")li.Text--------...

Globally change font sizes in firemonkey (at run time)
hello How do I change the default settings so I can in/decrease the font size of Tlabel/ buttons etc for all buttons in the app My understanding was to edit the global settings but with code how ? I googled forever but I could be wrong firemonkey is another beast from the VCL users thank you PW > {quote:title=Philippe Watel wrote:}{quote} > hello > How do I change the default settings so I can in/decrease the font size of Tlabel/ buttons etc for all buttons in the app > My understanding was to edit the global settings but with code how ? I googled forever > but I cou...

Run time Datawindow error in PowerBuilder 7.03 Apps.
Hi, We are in W2K environment, database is running SQL Server 2000 Standard on W2k SP3. The app. is built using PB7.03 10077. The run time is compiled in PBDs not DLLs. We have several run time reports are nested and sharing retrival arguments between the master and nested reports. Not knowing why since last Tuesday, we no longer able to run these reports, it either return all blank or give error message "SELECT Error: Incorrect syntax near the keyword IS". I discovered that some retrival arguments are not passing data correctly, it was pass as either NULL or blank. ...

fiGlobally change font sizes in firemonkey (at run time) [Edit]
hello How do I change the default settings so I can in/decrease the font size of Tlabel/ buttons etc for all buttons in the app My understanding was to edit the global settings but with code how ? I googled forever but I could be wrong firemonkey is another beast from the VCL users thank you PW Edited by: Philippe Watel on Jun 7, 2014 3:11 PM Philippe Watel wrote: > googled forever but I could be wrong If you google a bit more, you may even find the firemonkey group. This is for non-technical questions. ...

Changing a Label's Font Style at run time [Edit]
IW14.0.22Ultimate. DelphiXE4. TIWLabel.OnMouseOver I'd like change the Font.Style to fsunderline. It appears compiler does not like any changes to font style beyond those established at design time. Is there a unit that I'm not including, or if not, does anyone know of any run-time work-arounds short of writing a css or adding the styles to an existing one? Thinking I might outsmart any style sheet or css I set the style as underline at design-time (component and region) so I could clear the style at MouseOver (which works) and then get it back on OnMouseOut, but it didn't...

Web resources about - changing font at run time - sybase.powerbuilder.datawindow

The Changing Light at Sandover - Wikipedia, the free encyclopedia
"The Changing Light at Sandover" is a 560-page epic poem by James Merrill (1926–1995). Sometimes described as a postmodern apocalyptic epic, ...

Is Facebook Changing How We Travel?
When one of your Facebook friends posts a photo album of their trip to Maui, they’re not just showing off — they might also be acting as a travel ...

Missed this week's Changing Track?... - 774 ABC Melbourne - Facebook
Missed this week's Changing Track? We've got you covered. Like to submit your own? Email it to 774drive@abc.net.au

Facebook changing PMD program to Facebook Marketing Partners
Facebook’s Preferred Marketing Developer program may be getting a new look. Earlier today, Facebook announced on the Facebook for Business page ...

Changing Lanes (@chginglanes) on Twitter
Sign in Sign up To bring you Twitter, we and our partners use cookies on our and other websites. Cookies help personalize Twitter content, tailor ...

Changing the way business decisions are made
We believe that social data has unlimited value, and near limitless application. Today, we’re taking an important step toward unleashing this ...

12 Minutes To Create a Mind-Changing Presentation
... draft great presentations and to become a more effective and convincing presenter. Twelve minutes which can 12 Minutes To Create a Mind-Changing ...

We're Changing Our Name (Back) to Stack Overflow
We are Stack Overflow. You may know us from such popular websites as Stack Overflow Q&A, Stack Overflow Careers, The Stack Exchange Q&A Network, ...

The Tao of Twitter: Changing your life and business 140 characters at a time - Amazon
It's time to take the mystery out of Twitter. Twitter may be the most powerful business and personal networking platform ever created but it ...

App Store - Voices 2 ~ fun voice changing!
Read reviews, get customer ratings, see screenshots, and learn more about Voices 2 ~ fun voice changing! on the App Store. Download Voices 2 ...

Resources last updated: 1/14/2016 8:54:39 AM